Amazon EKS (Kubernetes) installation and configuration and Virtuoso docker container deployment

Notice : This Internal draft document details how to install and configure Amazon EKS and deploy a Virtuoso Docker container.

Amazon EKS Installation & Configuration

Amazon Elastic Container Service for Kubernetes (Amazon EKS) makes it easy to deploy, manage, and scale containerized applications using Kubernetes on AWS. Amazon EKS runs the Kubernetes management infrastructure for you across multiple AWS availability zones to eliminate a single point of failure.

The AWS Getting Started with Amazon EKS guide details the steps in setting up EKS under an AWS IAM user account. A successful installation and configuration can be confirmed with the aws eks describe-cluster --name <cluster-name> --query cluster.status command:

De-iMac-1540:kubernetes hwilliams$ aws eks describe-cluster --name eksKubeCluster --query cluster.status
De-iMac-1540:kubernetes hwilliams$

and can then be added as an available context to the current local Kubernetes configuration with the aws eks update-kubeconfig --name <cluster-name> command:

De-iMac-1540:kubernetes hwilliams$ aws eks update-kubeconfig --name eksKubeCluster
Updated context arn:aws:eks:us-east-1:129096879518:cluster/eksKubeCluster in /Users/hwilliams/.kube/config
De-iMac-1540:kubernetes hwilliams$

The available kubernetes context’s can then be viewed with the kubectl config get-contexts command to confirm it has been added and made the currently available context:

De-iMac-1540:docker hwilliams$ kubectl config get-contexts
CURRENT   NAME                                                        CLUSTER                                                     AUTHINFO                                                    NAMESPACE
*         arn:aws:eks:us-east-1:129096879518:cluster/eksKubeCluster   arn:aws:eks:us-east-1:129096879518:cluster/eksKubeCluster   arn:aws:eks:us-east-1:129096879518:cluster/eksKubeCluster   
          docker-for-desktop                                          docker-for-desktop-cluster                                  docker-for-desktop                                          
          minikube                                                    minikube                                                    minikube                                                    
De-iMac-1540:docker hwilliams$

Deployment of Virtuoso Docker container

Now the kubernetes (kubectl) context is set to the Amazon EKS installation, a Virtuoso docker container can be deployed as normal to the EKS worker nodes on AWS, with the kubectl run <name> ... and kubectl expose deployment <name> ... commands. Although as the EKS worker nodes are in AWS you cannot access them on localhost, thus to an Ingress Load balancer needs to be specified to as part of the deployment command to make the Virtuoso Container accessible from an external AWS DNS name with the --type=LoadBalancer attribute:

De-iMac-1540:virtuoso-test hwilliams$ kubectl run dh-vos7 --image=openlink/virtuoso-opensource-7 --port=8890
deployment.apps "dh-vos7" created
De-iMac-1540:virtuoso-test hwilliams$ kubectl expose deployment dh-vos7 --port=8890 --target-port=8890  --name=dh-vos7 --type=LoadBalancer
service "dh-vos7" exposed
De-iMac-1540:virtuoso-test hwilliams$ 

A description of the deployed Virtuoso service can be obtained with the kubectl describe services <name> command:

De-iMac-1540:virtuoso-test hwilliams$ kubectl describe services dh-vos7
Name:                     dh-vos7
Namespace:                default
Labels:                   run=dh-vos7
Annotations:              <none>
Selector:                 run=dh-vos7
Type:                     LoadBalancer
LoadBalancer Ingress:
Port:                     <unset>  8890/TCP
TargetPort:               8890/TCP
NodePort:                 <unset>  31598/TCP
Session Affinity:         None
External Traffic Policy:  Cluster
  Type    Reason                Age   From                Message
  ----    ------                ----  ----                -------
  Normal  EnsuringLoadBalancer  17s   service-controller  Ensuring load balancer
  Normal  EnsuredLoadBalancer   15s   service-controller  Ensured load balancer
De-iMac-1540:virtuoso-test hwilliams$

With the LoadBalancer Ingress attribute providing the external hostname the service is available on, thus the Virtuoso deployment can be accessed on

The Virtuoso dba users password can be determined by connecting to the deployed docker image and checking the contents of the cat /settings/dba_password file:

De-iMac-1540:virtuoso-test hwilliams$ kubectl exec -it dh-vos7-7769fb6cbd-wxtpw -- /bin/bash
root@dh-vos7-7769fb6cbd-wxtpw:/opt/virtuoso-opensource/database# pwd
root@dh-vos7-7769fb6cbd-wxtpw:/opt/virtuoso-opensource/database# cat /settings/dba_password

Kubernetes Web UI (Dashboard) Deployment

Dashboard is a web-based Kubernetes user interface. You can use Dashboard to deploy containerized applications to a Kubernetes cluster, troubleshoot your containerized application, and manage the cluster resources. You can use Dashboard to get an overview of applications running on your cluster, as well as for creating or modifying individual Kubernetes resources (such as Deployments, Jobs, DaemonSets, etc). For instructions on deployment see the Web UI Dashboard documentation.

Once deployed the Dashboard is accessed via a proxy with the kubectl proxy command:

De-iMac-1540:docker hwilliams$ kubectl proxy
Starting to serve on

This will make Dashboard available at http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/