Monitoring with Kubernetes

Introduction:

In previous blogs, we have explored the Azure Container Service and Kubernetes. In this blog, we will explore the monitoring with Kubernetes.

Prerequisite:

Running Kubernetes Cluster

Kubectl utility

For reliable applications, it is required to have in place monitoring of the Kubernetes Cluster. It helps to determine availability, scalability, and reliability of the application deployed over Kubernetes Cluster.

Heapster aggregator is used for monitoring and event the logs. Heapster stores the information in storage backend. Currently, it supports Google Cloud Monitoring and InfluxDB as the storage backends. Heapster runs as a pod in the Kubernetes Cluster. It communicates with each node of the Kubernetes Cluster. Kubelet agent is responsible to provide the monitoring information to Heapster. Kubelet itself collects the data from cAdvisor.

cAdvisor:

cAdvisor is an open source container usage and performance analysis agent. In Kubernetes cAdvisor is included into Kubelet binary.cAdvisor auto-discovers all containers. It collects the information of CPU, memory, network and file system usage statistics.

Kubelet:

Kubelet bridge the gap between Kubernetes Master and Kubernetes Node. It manages the Pods and Containers on each machine.

InfluxDB and Grafana are used for storing the data and visualizing it. Google cloud monitoring provides the hosted solution for monitoring Kubernetes Cluster. Heapster can be set up to send the metrics to Google Cloud monitoring.

Prometheus and Data Dog are also good tools for monitoring the Kubernetes Cluster. If you need the quick solution with Prometheus operator then https://github.com/camilb/prometheus-kubernetes is one of the good repo for monitoring with Kubernetes.