Choose the right tool for the successful monitoring of Kubernetes!

Kubernetes is a production-ready, open-source platform designed with Google’s acquired experience in container orchestration, associated with best-of-breed ideas from the public. It is projected to automate deploying, scaling, and operating application containers.

With the modern way of building and running applications, your control and observability strategies need to advance, and so the tools that you use. The traditional infrastructure monitoring tools may not be sufficient, and you need a specialized Kubernetes monitoring system, as listed below.

Some help with logs and others with metrics. Some give an interface for operating Kubernetes from a birds-eye view. Some are Kubernetes-native, while others are more agnostic.

Prometheus

Prometheus is one of the most popular and best monitoring tools used with Kubernetes. This tool is developed early by SoundCloud and later donated to the CNCF. Google Borg Monitor inspires it.

Well, Prometheus stores all its data as a time sequence. In a nutshell, the thing makes Prometheus stand out among other time-series databases, is its built-in alerting mechanisms, multidimensional data model, a pull vs. push model, PromQL (the Prometheus querying language), and of course, the ever-growing community.

Some more features of Prometheus includes:

  • No reliance on distributed storage;
  • Targets are discovered through the service discovery or static configuration
  • PromQL, a flexible query language to advantage this dimensionality
  • Single server nodes are autonomous
  • Time-series collection happens via a pull model over HTTP
  • Pushing time series is supported through an intermediary gateway
  • A multidimensional data model with time series data analyzed by metric name and key/value pairs
  • And, multiple forms of graphing and dashboarding support

The best way to learn Prometheus is to install on your lab server and play around with it. They got great documentation, but if you are looking for video-based learning, then check out this Udemy course.

Kubewatch

Kubewatch is a Kubernetes watcher which publishes event notifications in a Slack channel. This tool provides you the facility to determine the resources you need to monitor. It is created in Golang and uses a Kubernetes client library to connect with a Kubernetes API server. This library serves as a base factor for the Kubernetes event watching.

kubewatch is simple to configure and can be deployed using either helm or system deployment. More clearly, kubewatch will see for changes required to specific Kubernetes resources that you seek it to watch — deployments, daemon sets, pods, services, replica sets, services, replication controllers, secrets, and configuration maps.

Jaeger

Distributed tracing is steadily growing into monitoring and troubleshooting Kubernetes environments.  Jaeger is a tracing system, which is released by Uber Technologies. It’s used for monitoring transactions and troubleshooting in complex distributed systems.

Jaeger features OpenTracing-based instrumentation for Java, Python, Node, and C++. It uses consistent upfront sampling with individual per service/endpoint probabilities and supports multiple storage backends — Cassandra, Elasticsearch, Kafka, and memory.

Some of the other features of Jaeger includes:

  • Distributed transaction monitoring
  • Distributed context propagation
  • Performance / latency optimization
  • Root cause analysis
  • Service dependency analysis

cAdvisor

cAdvisor is designed for assembling, processing, and exporting resource usage and production information about running containers. It’s also developed into Kubernetes and integrated into the Kubelet binary. It’s simple to use (it exposes Prometheus metrics out-of-the-box) but not robust enough to be recognized as an all-round monitoring solution.

Unlike others, cAdvisor is not deployed per pod but on the node level. It will auto-determine all the containers running on a system and collects system metrics such as memory, CPU, network, etc.

cAdvisor is a basic tool, and the following are some of its features.

  • Native support for Docker containers and aid other container types.
  • Supports exporting of the stats to various storage plugins, ex. InfluxDB etc.,
  • It provides the overall machine usage by analyzing the ‘root’ container on the machine.
  • Support for running standalone outside of the Docker or any other container also.
  • cAdvisor operates per node. It auto-discovers all the containers in the given node and collects CPU, filesystem, and network usage statistics.
  • Metrics can be viewed on the Web-UI, which exports live information about all containers on the system.

Cabin

Cabin is the best native mobile dashboard app for the Kubernetes. Cabin UI is developed using React Native hence runs both iOS and Android devices. It is on the move assistant, which gives fine-grained actions to manipulate Kubernetes resources. Cabin app is touch-advance.

For example, you can also delete pods with a simple left swipe. You can also scale deployments with a finger scroll.

Some other features:

  • Create basic deployments Scale deployments and replication controllers
  • Switch service types
  • Expose deployments via services
  • Integration with GKE for single-click cluster provisioning
  • Access logs in multiple containers
  • Remove and add labels
  • Open NodePort services in the browser
  • Execute commands in containers

Telepresence

Telepresence lets you run a particular service locally while connecting that service to a remote Kubernetes cluster. This lets developers working on multi-service operations to adopt any tool installed locally to check/debug/edit your service. For instance, you can run a debugger or IDE.

It also lets developers do fast local development of a particular service, even if that service depends on separate services in the cluster. Make a transition to your service, save, and you can instantly spot the new service in action.

Telepresence is an impressive local development environment for services running in Kubernetes. The live debugging part is unique and getting evolved quite rapidly. Below are some of its more features.

  • Allow code running in the container to connect to an IDE or debugger running on the host.
  • Telepresence uses an OpenShift-specific proxy image when it observes an OpenShift cluster.
  • Telepresence also supports the forwarding traffic to and from other containers in the pod.
  • Telepresence uses a Docker-accessible directory as the temporary dir.

Weave Scope

Weave Scope is a troubleshooting & monitoring tool for Kubernetes. It makes logical topologies of your application and infrastructure, which facilitate you to consider, monitor, and control your containerized, microservices-based application.

It gives a top-down view into your app as well as your full infrastructure. It authorizes you to determine any problems with your distributed containerized app in real-time, as it is deployed to a cloud provider.

Some of the features of the Weave Scope includes:

  • Support for any deployment style (Local, hosted, or hybrid) and the ability to collect and report Host/Container metrics
  • Aggregate metrics, events, and labels from Kubernetes
  • Real-time Contextual metrics
  • Nodes can be filtered by CPU and Memory management so that you can quickly identify containers using the most resources.

Grafana

Grafana is used to visualize metrics but also an alerting tool. Grafana can issue an alert on Slack, webhook, mail, or alternative communication channels. Another key reason is the source of your data: Grafana can query several entities at the same time.

You can query from database like ElasticSearch or monitoring tools like Cloudwatch, and also set alerts on it. Some other features are as below.

  • An alert manager handles the alerting part
  • Easy installation of exporters
  • The app uses Kubernetes tags to allow to filter pod metrics too.
  • The Pod/Container dashboard leverages the pod tags so as to find the relevant pod or pods easily.

Zabbix

With Zabbix, it is feasible to build virtually limitless types of data from the system. High-performance real-time monitoring systems that tens of thousands of servers, virtual machines, and network devices can be controlled simultaneously.

Along with saving the data, visualization features are accessible, as well as extremely flexible ways of figuring out the data for the purpose of alarming.

Some of the features of Zabbix includes:

  • Root Cause Analysis
  • Zabbix helps in keeping the data in JSON format, so many applications can also use it.
  • Real-Time Monitoring
  • Zabbix proxy is highly suggested for wide-scale production systems.
  • Drill-Down Reports
  • The low-level discovery automatically checks the new nodes without any struggle.
  • Highly configurable and extensible.

Zabbix is significant and not just Kubernetes but fit to monitor infrastructure and application metrics too. If you are interested in learning Zabbix, then check out this brilliant course.

Conclusion

Choosing the right monitoring tool is crucial. But guess what? Above all is available in FREE to try, so why not get some cloud VM and see what works for your Kubernetes monitoring?

Happy monitoring and troubleshooting!