Use Kubernetes Operational View to monitor Kubernetes deployment

You can download this article in PDF format via the link below to support us.Download the guide in PDF formatClose

As a system administrator, you have a lot of tools for you to use, just like a plumber who equips him/her with various equipment during a busy and meaningful day. Although you can use a variety of tools to meet the specific needs you may need, the solution to those tools that you have a deep understanding and solve most problems is the core of everyone’s pursuit.

In this guide, we explored another tool you might consider using, which might help to fit into a specific area you have been considering. If you are managing a Kubernetes cluster or several of them, you may need to pay more attention and weigh whether the Kubernetes Operational View is suitable for your daily management activities. Let us understand what the developers of Kubernetes Operational View thought while cooking this meal.

The goal of Kubernetes Operational View is to provide a common operation screen for multiple Kubernetes clusters. it:

  • Render the node and indicate its overall status (whether it is “ready”)
  • Display node capacity and resource usage (CPU, memory). Each CPU renders a “box” and fills it to the sum of Pod CPU request/usage. Rendering vertical bars represents total memory and fills it to the sum of Pod memory request/usage.
  • Rendering a single Pod indicates the Pod status through the color of the border line (green: ready/running, yellow: pending, red: error, etc.). The current CPU/memory usage (collected from Heapster) is displayed by a small vertical bar. System Pod (” kube-system” namespace) will be grouped at the bottom
  • Provide tooltip information for nodes and pods
  • Animate pod creation and termination. Resources: Kubernetes action View the GitHub page

Kubernetes Operational View should not be used as:

  • Alternative to Kubernetes dashboard. The Kubernetes dashboard is a universal UI that allows to manage applications.
  • Monitoring solutions.Use your preferred monitoring system to alert production issues
  • Operation management tools. The Kubernetes Operational View does not allow interaction with the actual cluster.

prerequisites

You should have one or more Kubernetes clusters before you can use it in this setup. You can set up a complete cluster using Minikube or using the guide shared below.

Use K3 to deploy a lightweight Kubernetes cluster in 5 minutes

Install Minikube Kubernetes on CentOS 8 / CentOS 7 using KVM

How to install Minikube on Ubuntu and Debian Linux

Set up MicroK8s Kubernetes cluster on CentOS 8

Use EKS to easily set up a Kubernetes cluster on AWS

Use kubeadm to install Kubernetes cluster on Ubuntu 20.04

Use kubeadm to install a Kubernetes cluster on CentOS 7

Use Rancher RKE to install a production Kubernetes cluster

Install Kube Ops View

GitHub provides the Kubernetes Operational View source code. You can find a sample Kubernetes manifest list for deployment in the deploy folder in the repository. We will need to clone the file and then deploy the manifest in the “deploy” directory. If necessary, you can edit the manifest before deploying it to suit the needs of the cluster, such as namespaces. Installing Kube Ops View in Kubernetes should be simple:

$ 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

If you have not edited the manifest file, it will deploy kube-ops-view in the default namespace.

Before trying to access the Kubernetes Operational View from a browser, please 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   <none>        80/TCP     6m17s
kube-ops-view-redis   ClusterIP   10.108.212.78    <none>        6379/TCP   6m17s
kubernetes            ClusterIP   10.96.0.1        <none>        443/TCP    32d 

If you like good visual effects, you can also check them on the dashboard

Now we know the services we have in the default namespace where kube-ops-view is deployed. Next, to access the dashboard from an external mini library, expose the proxy as 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 execution, you can access the kube-ops-view and minikube dashboards through a browser. To do this, open a browser and point it to the following URL.

####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/

Use Kubernetes Operational View to monitor Kubernetes deployment

Expanded view

Use Kubernetes Operational View to monitor Kubernetes deployment

Note that hovering the mouse over the box can provide you with more detailed information about Pods and Nodes.

Multiple clusters

On its GitHub page, multiple clusters can be supported by passing the API server list, reading the kubeconfig file, or pointing to the HTTP cluster registry endpoint.For more information, see Multiple cluster documents

references: Kubernetes Ops view GitHub page

in conclusion

At a glance, you can view and check the status of Pods in multiple clusters at a glance, which can save you a lot of time spent logging in to the dashboard of each cluster. Since it displays node capacity and resource usage (such as CPU, memory), you will be able to deal with any emergency situations that may arise due to such indicators, thereby improving the KPIs you and your customers reach. Kube Ops View can be very useful, you can give it a try and provide support for the good work of the project. Finally, as always, we must thank you for your continued support and hope this guide is helpful to you. For other content similar to this, please check the following:

Linux and FreeBSD resource monitoring using bpytop

Installation lens-best Kubernetes dashboard and IDE

You can download this article in PDF format via the link below to support us.Download the guide in PDF formatClose

Sidebar