Having an arsenal of tools at your disposal as a System Admin is as essential as a plumber with his/her assortment of equipment on a busy and rewarding day. While there are a multitude of tools that you can jump on to satisfy a given need you may be having, settling on the ones that you deeply understand and solve most of your problems are the core of what everyone looks out for.
In this guide, we explore one more tool that you might consider checking out and maybe it will help fit into some niche you have been thinking about. If you are managing a Kubernetes cluster or a couple of them, you may need to pay a little more attention and weigh if Kubernetes Operational View may fit into your daily administrative activities. Let us understand what the developers of Kubernetes Operational View had in mind while cooking this meal.
The goal of Kubernetes Operational View is to provide a common operational picture for multiple Kubernetes clusters. It:
- Renders nodes and indicates their overall status ( whether “Ready” or otherwise)
- Shows node capacity and resource usage (CPU, memory)
Render one “box” per CPU and fill up to sum of pod CPU requests/usage
Render vertical bar for total memory and fill up to sum of pod memory requests/usage
- Renders individual pods
Indicate pod status by border line color (green: ready/running, yellow: pending, red: error etc)
Show current CPU/memory usage (gathered from Heapster) by small vertical bars
System pods (“kube-system” namespace) will be grouped together at the bottom
- Provides tooltip information for nodes and pods
- Animates pod creation and termination. Source: Kubernetes Ops View GitHub page
Kubernetes Operational View should not be used as:
- A replacement for the Kubernetes Dashboard. The Kubernetes Dashboard is a general purpose UI which allows managing applications.
- A monitoring solution. Use your preferred monitoring system to alert on production issues
- A operation management tool. Kubernetes Operational View does not allow interacting with the actual cluster.
You should be having a Kubernetes cluster or a multiple of them before you can utilize it in this setup. You can use Minikube or setup a full cluster using the guides shared below.
Installation of Kube Ops View
Kubernetes Operational View source code is available in GitHub and you can find sample Kubernetes manifests for deployment in the deploy folder inside the repository. We will need to clone the files then deploy the manifests inside the “deploy” directory. If you wish, you can edit the manifests to suit the needs of your cluster such as namespaces and such before you deploy them. Installing Kube Ops View in Kubernetes should be as simple as:
$ git clone https://github.com/hjacobs/kube-ops-view.git $ cd kube-ops-view $ kubectl apply -k deploy serviceaccount/kube-ops-view created clusterrole.rbac.authorization.k8s.io/kube-ops-view created clusterrolebinding.rbac.authorization.k8s.io/kube-ops-view created service/kube-ops-view-redis created service/kube-ops-view created deployment.apps/kube-ops-view-redis created deployment.apps/kube-ops-view created
That will deploy kube-ops-view in the default namespace if you did not edit the manifest files.
Before we can attempt to access Kubernetes Operational View from the browser, check all services as follows:
$ kubectl get services NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kube-ops-view ClusterIP 10.100.150.191
80/TCP 6m17s kube-ops-view-redis ClusterIP 10.108.212.78 6379/TCP 6m17s kubernetes ClusterIP 10.96.0.1 443/TCP 32d
You can also check them on your dashboard if you prefer good visuals
Now we know the services that we have in the default namespace where kube-ops-view was deployed. Next, to access the dashboard from outstde minikube, expose proxy to be accessible from any IP as shown below:
$ kubectl proxy --address='0.0.0.0' --disable-filter=true ###You should see an output similar to below### W0929 13:39:07.674579 3493 proxy.go:167] Request filter disabled, your proxy is vulnerable to XSRF attacks, please be cautious Starting to serve on [::]:8001
After that is executed, you can access kube-ops-view as well as minikube dashboards via the browser. To do so, open up your browser and point it to the following URLs.
####Kube-Ops-View Dashboard#### http://172.20.120.119:8001/api/v1/namespaces/default/services/http:kube-ops-view:/proxy/ $ kubectl proxy --address='0.0.0.0' --disable-filter=true ####Minikube Dashboard#### http://172.20.120.119:8001/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/
Note that hovering over the boxes gives you more details about the pods and the nodes.
From its GitHub page, multiple clusters are supported by passing a list of API servers, reading a kubeconfig file or pointing to an HTTP Cluster Registry endpoint. More on this can be found at its Multiple Clusters documentation
References : Kubernetes Ops View GitHub page
Having one place where you can view and check the status of your pods in multiple clusters at a glance can save a lot time you would have invested in logging into every cluster’s dashboard. Since it shows node capacity and resource usage ( for example CPU, memory), you will be able to act upon any emrgencies that might arise due to such metrics hence improving KPIs you had agreed with your customers. Kube Ops View can be as helpful as it is and you can give it a try as well as support the project for the good work it doing. Finally, as always, we cannot end without appreciating your continued support and we hope the guide was helpful.