Home Explore Blog CI



kubernetes

3rd chunk of `content/en/blog/_posts/2015-05-00-Resource-Usage-Monitoring-Kubernetes.md`
2ceab08343d930c7965961fb52dd9542f9644c2095f4998a00000001000006be
![](https://3.bp.blogspot.com/-V5KAfomW7Cg/V4mGH6OTKSI/AAAAAAAAAmo/EZHcG0afrs0606eTDMCryT6j6SoNzu3PgCEw/s400/cadvisor.png)](https://3.bp.blogspot.com/-V5KAfomW7Cg/V4mGH6OTKSI/AAAAAAAAAmo/EZHcG0afrs0606eTDMCryT6j6SoNzu3PgCEw/s1600/cadvisor.png)

**Kubelet**  

The Kubelet acts as a bridge between the Kubernetes master and the nodes. It manages the pods and containers running on a machine. Kubelet translates each pod into its constituent containers and fetches individual container usage statistics from cAdvisor. It then exposes the aggregated pod resource usage statistics via a REST API.



**STORAGE BACKENDS**



**InfluxDB and Grafana**



A Grafana setup with InfluxDB is a very popular combination for monitoring in the open source world. InfluxDB exposes an easy to use API to write and fetch time series data. Heapster is setup to use this storage backend by default on most Kubernetes clusters. A detailed setup guide can be found [here](https://github.com/kubernetes/heapster/blob/master/docs/influxdb.md). InfluxDB and Grafana run in Pods. The pod exposes itself as a Kubernetes service which is how Heapster discovers it.



The Grafana container serves Grafana’s UI which provides an easy to configure dashboard interface. The default dashboard for Kubernetes contains an example dashboard that monitors resource usage of the cluster and the pods inside of it. This dashboard can easily be customized and expanded. Take a look at the storage schema for InfluxDB [here](https://github.com/kubernetes/heapster/blob/master/docs/storage-schema.md#metrics).



Here is a video showing how to monitor a Kubernetes cluster using heapster, InfluxDB and Grafana:


 [![](https://img.youtube.com/vi/SZgqjMrxo3g/0.jpg)

Title: Kubelet, InfluxDB, and Grafana for Kubernetes Monitoring
Summary
Kubelet manages pods and containers on nodes, fetching container statistics from cAdvisor and exposing aggregated pod resource usage via a REST API. InfluxDB and Grafana are a popular open-source monitoring combination. Heapster uses InfluxDB as its default storage backend, with data written and fetched via an easy-to-use API. Grafana provides a customizable dashboard interface to visualize the cluster's and pods' resource usage.