Unsolved
1 Rookie
•
30 Posts
0
681
October 31st, 2022 01:00
EKS Anywhere, and Octant, a simple yet very powerful UI to visualize EKSA clusters
This article is part of the EKS Anywhere series EKS Anywhere., extending the Hybrid cloud momentum
The debate between the ticks of a keyboard v/s the clicks of a mouse has been an everlasting one. In other words, the CLI v/s GUI discussion always relays a sense that varied personas like to consume and operate technology stacks differently.
One such case., is with the standard “kubectl”, the ubiquitous command line for Kubernetes in contrast with a myriad and evolving scene of operating dashboards. In that context, Octant from VMware is a classic open-source toolchain that helps developers, operators and administrators alike view Kubernetes resources in a wonderful GUI.
In this article, we will deploy Octant for EKS Anywhere clusters observing some important changes to be made. Thereon, what you do with the dashboards and how you explore is to your imagination.
The implementation steps are outlined for a ubuntu 20.04 machine with sudo access. Download Octant and extract the file from the github url Release v0.13.1 · vmware-tanzu/octant (github.com)
Once the files are extracted
Next, we will create a Linux service based on Octant. The configuration file for the Octant service will also implement a variable
Environment=”KUBECONFIG=/home/ubuntu/.kube/config"
Note: For non-EKS Anywhere clusters
You could alter the environment variable to point at the desired location of the kubeconfig file. Alternatively, you can delete the line itself if you are manually setting/exporting the KUBECONFIG variable for you cluster access.
VERY IMPORANT: In the case of EKS Anywhere, the cluster creation process creates a dedicated directory per cluster that holds the individual kubeconfig files. So we will have to perform an extra step in a multi-cluster environment to merge all the kubeconfig files of the individual EKS Anywhere clusters
To do so., simply execute the below code
Assuming that you have two workload EKS-Anywhere clusters that you want to see in Octant
CLUSTER1=testworkload01
CLUSTER2=testworkload02
Note how we are setting the KUBECONFIG variable to construct a semicolon separated list of of individual kubeconfig files and then using the merge and flatten arguments to create a temporary file finally leading to a properly constructed .kube/config file
KUBECONFIG=$HOME/.kube/config:$HOME/$CLUSTER1/$CLUSTER1-eks-a-cluster.kubeconfig:$HOME/$CLUSTER2/$CLUSTER2-eks-a-cluster.kubeconfig \
kubectl config view --merge --flatten > \
~/.kube/merged_kubeconfig && mv ~/.kube/merged_kubeconfig ~/.kube/config
NOTE: If you have more than 2 clusters, just create the variables, e.g. CLUSTER3=xxxx, CLUSTER4=xxxxx and then append to the KUBECONFIG command via the semicolons as you see for CLUSTER1 & CLUSTER2
and then create the Linux service for Octant by executing the procedure documented in the below given gist
https://gist.github.com/thecloudgarage/e817cdb1369f439a1cd083ac3bf88c50
And that’s it! You can browse the IP-address:8900 and see the dashboard in action with a superb capability of macro to micro views. The dashboard relay information about namespaces, pods, and every possible aspect of workload inspection.
From the Octant GUI, you can also switch between multiple clusters that are a part of your kubeconfig contexts.
You can also view object linkages by looking at the resource view
Beyond the views, one can also use the YAML sections to edit and update the resources
Go ahead and experiment., once deployed you will fall in love with it.
cheers
Ambar Hassani
#iwork4dell