Introduction to Monitoring Kubernetes

Introduction to Monitoring Kubernetes

Table of Contents

Distributed monitoring pain points

The growing adoption of microservices architecture is also driving the adoption of containers to package, distribute and run the microservices. This requires orchestrators to handle the availability, performance, and deployments of those containers on the server.

However, the entire setup around microservices, containerization, and orchestrators complicate logging and monitoring since various distributed and diversified applications are interacting with each other. A single point of failure can sometimes discontinue the uninterrupted process, making us aware of the issue, but detecting other issues is another story.

Although a container orchestration tool such as Kubernetes orchestrates containers in various distributed systems and subdues the intricacies introduced by distributed processing, Kubernetes is itself complicated and has too many components to monitor. Unlike a monolithic application where there are just two components to monitor — applications and the hosts, Kubernetes has four: Nodes(hosts), the Kubernetes platform itself, Docker containers, and the containerized microservices.

Evidently, traditional monitoring tools that log parameters like CPU use, memory use, input-output (I/O) per second, latency, and network bandwidth are rendered inadequate in a cloud-native era of Microservices, Docker containers, and Kubernetes. The monitoring strategies in the cloud-native era need granular detail at the container or service level.

Moreover, traditional monitoring methods were devised along with a long-running host model. A traditional data center is formed of a number of servers hosting monolithic applications, with static IPs and hostnames. The monitoring was associated with these constant parameters, rarely changing in opposition to microservices architecture.

Microservices-based applications are characteristically deployed on containers that are dynamic and transient. Kubernetes requires a number of application models to be running. Kubernetes has this tendency to place the pods on whichever nodes it deems fit unless otherwise indicated. Actually, Kubernetes' ability to schedule pods is the epitome of its self-adjusting system.

Therefore, monitoring tools in containerized environments need to offer instant service discovery and auto-detection of lifecycle events of containers. They should also require adjusting metrics as containers are created or restarted every second.

In a nutshell, identifying problems in a microservices environment is a little more challenging than in a monolithic environment, as requests navigate between various stack layers under the multitudes of services. Modern monitoring tools are required to monitor these interconnected layers while also resourcefully classifying application and infrastructure behavior to simplify troubleshooting.



Limitations of standard Kubernetes dashboard and in-house tools

The standard Kubernetes dashboard offers a basic UI that displays resource utilization information. In addition, it can organize applications running in the cluster and the cluster itself. However, the Kubernetes dashboard lacks the sophistication of more advanced Kubernetes monitoring tools such as Prometheus and Grafana. On top of that, the Kubernetes dashboard relies on Heapster, a deprecated performance monitoring and metrics collection system for Kubernetes.

Organizations invested in Kubernetes should look across the plethora of monitoring tools instead of developing their own tools internally. The following tools are not only efficient at monitoring Kubernetes, they are also undergoing constant improvement owing to an open-source community.



cAdvisor is an open-source container resource usage and performance analysis agent built for containers and has Docker DNA flowing all over it. In Kubernetes, cAdvisor is included in the Kubelet binary. As a result, cAdvisor runs at node level rather than pod level.

In its typical configuration, cAdvisor auto-discovers every live container and reports its usage CPU, memory, filesystem, and network in real time.

cAdvisor as a tool is apt for measuring some basic machine-level performance characteristics. However, it lacks an analytics engine to report meaningful insights.



Usually used in concurrence with the very popular but now deprecated Heapster, Kube-state-metrics is a minimalistic service that gathers data reported to the Kubernetes API server.

It reaps insights about the state of objects such as Deployment, Node, PersistentVolume, Pod, Service, etc.

The biggest downside is that Kube-state-metrics delivers the metrics in plain text form. Of course, you can scrape the metrics to a capable analytics software suite. However, that means you must bring your own tools to make the data from Kube-state-metrics comprehensible.



Prometheus is, indeed, one of the most promising ways to bring end-to-end visibility into your Kubernetes environments. Prometheus is more than a monitoring system. However, to unlock its true potential beyond just a time-series database, you must explore how it integrates with different remote endpoints and storage systems (like VictoriaMetrics, Elasticsearch, Graphite, InfluxDB, and Postgres), alert webhook receivers (like SNS, SMS, SNMP, Slack, IRC, and Telegram Bot) and other integrations like file service discovery tools.



Grafana is a metrics analytics platform. It enables querying, visualizing, alerting, and understanding Kubernetes metrics.

To monitor Kubernetes you can use the Grafana Kubernetes App, which includes four dashboards: Cluster, Node, Pod/Container, and Deployment.

The biggest strength of Grafana is its flexibility. It allows you to bring together numerous metrics into a convenient dashboard at your ease. For example, you can catch the metrics from cAdvisor or Prometheus. In addition to the standard metrics that every node and pod will have, Grafana allows you to add specific metrics for applications.

MetricFire offers a Hosted Grafana service, where you can try out Grafana and see what it's all about.



Kubewatch is an event-triggered notification system that can integrate easily with your Slack channel. You just need to stipulate what needs to be monitored, and it will enable a Kubernetes client library for that event to interact with a Kubernetes API server and return notifications.

You can choose the resources to watch: daemon sets, deployments, pods, replica sets, replication controllers, services, secrets, configuration maps, etc.



Jaeger troubleshoots and monitors transactions in complex distributed systems such as Kubernetes.

Microservices architecture is distributed in nature and may result in problems when achieving distributed context propagation, transaction monitoring, and latency optimizations. Jaeger is a monitoring system of, by, and for distributed systems.

Native support for OpenTracing, Jaeger addressed networking and observability in Kubernetes. Jaeger instrumentation libraries, backend, and Web UI have been designed to support the OpenTracing standard, which is a set of vendor-neutral APIs and instrumentation for distributed tracing. Jaeger clients are language-specific implementations of the OpenTracing API. Jaeger daemon receives tracing information submitted by applications via Jaeger client libraries. It can run as a sidecar container or an independent DaemonSet.



MetricFire offers a comprehensive infrastructure and application monitoring platform from a set of open-source monitoring tools. Offering Hosted Graphite and Hosted Grafana. Users can view metrics on detailed dashboards in real-time, without having to do anything but send the metrics over to MetricFire.

Hosted Graphite and Hosted Grafana through MetricFire allow for the continuous active deployment of new features, as MetricFire’s products all have their foundations in the ever-growing open source projects. Configuring the Snap Daemon to send Kubernetes metrics to your MetricFire account is simple and just requires configuring your account's API key to be used as the prefix for each metric and the URL Endpoint to be used as the server destination. Check out our article Monitoring Kubernetes with Hosted Graphite to learn how to set up monitoring your Kubernetes infrastructure quickly and easily using our Hosted service.

Moreover, MetricFire provides Hosted Graphite and Grafana as-a-service and includes missing features in vanilla Graphite – Grafana dashboards with long-term storage and technical support. You can sign up for a free trial with MetricFire today and start building Kubernetes dashboards within a few minutes.



Organizations that are invested in K8s and Docker containers to empower their microservices, should consider one of the existing Kubernetes monitoring tools, instead of putting their efforts into creating a new one.

It's better to use the existing monitoring tools that offer unparalleled customizations and are getting better with every version thanks to a large community.

For organizations, managed Kubernetes monitoring tools are a worthwhile option to consider as they allow them to focus on delivering value to their customers without the need to spend time on unnecessary but avoidable tasks.

Sign up for a free trial with MetricFire and start monitoring your Kubernetes today. Book a demo and talk to us directly about monitoring your Kubernetes infrastructure.

You might also like other posts...
kubernetes Oct 12, 2023 · 19 min read

Logging for Kubernetes: Fluentd and ElasticSearch

Use fluentd and ElasticSearch (ES) to log for Kubernetes (k8s). This article contains useful... Continue Reading

kubernetes Oct 11, 2023 · 9 min read

Python API with Kubernetes and Docker - Part I

Use Docker to containerize an application, then run it on development environments using Docker... Continue Reading

kubernetes Oct 06, 2023 · 13 min read

Tips for Monitoring Kubernetes Applications

Monitoring is the most important aspect of infrastructure operations. This article will give you... Continue Reading

header image

We strive for
99.999% uptime

Because our system is your system.

14-day trial 14-day trial
No Credit Card Required No Credit Card Required