Grafana Kubernetes Monitoring

Grafana Kubernetes Monitoring

Grafana Kubernetes Monitoring is a core Grafana Cloud feature that allows you to view all of your Kubernetes data in one place. If you are shipping kube-state-metrics to Grafana Cloud, you will be able to inspect the health of your clusters, containers, and pods with little or no required configuration. You can also access pre-configured dashboards, alert rules, and recording rules.

Pod view in Grafana Kubernetes Monitoring
Pod view in Grafana Kubernetes Monitoring

Grafana Kubernetes Monitoring installation

To get started with Grafana Kubernetes Monitoring, and to get pre-configured dashboards and alerts, go to the Cluster navigation tab, click Install dashboards and rules, and follow the instructions. For more information, or to view installation instructions before installation, see Configuring Kubernetes monitoring.

NOTE: You must have the Admin role to install and configure dashboards and alert rules.

If you don’t want to use the pre-configured Agent manifests, you can manually deploy and scrape kube-state-metrics. The following metrics are required to use the cluster navigation feature:

- kube_namespace_status_phase
- container_cpu_usage_seconds_total
- kube_pod_status_phase
- kube_pod_start_time
- kube_pod_container_status_restarts_total
- kube_pod_container_info
- kube_pod_container_status_waiting_reason
- kube_daemonset.\*
- kube_replicaset.\*
- kube_statefulset.\*
- kube_job.\*

NOTE: Logs are not required for Kubernetes Monitoring to work, but they will provide additional context in some views of the cluster navigation. Log entries must be shipped to a Loki data source with cluster, namespace, and pod labels.

Manual installation

If you would like to manually connect your Kubernetes data to Grafana Cloud see the following topics:

Cluster navigation

In the Cluster navigation page, you can can view all of the namespaces and clusters of the data source you choose in the dropdown menu. You can also view the namespace phase status, and click on the number of firing alerts to quickly navigate to Grafana Alerting. You can continue to drill down through namespaces, workloads, and pods.

The Cluster navigation view in Grafana Kubernetes Monitoring
The Cluster navigation view in Grafana Kubernetes Monitoring

Configure Grafana Kubernetes Monitoring

Users with the Admin role can use the Configuration tab to install or uninstall pre-configured dashboards and alerts. You can also view instructions to configure and deploy Grafana Agent to keep it up-to-date. For more information on updating your dashboards and rules, see Update Grafana Kubernetes components.

Note: In order to see Agent configuration instructions, you must have the pre-configured dashboards and alerts installed.

TNS Demo App Walkthrough

Learn how to deploy an instrumented three-tier (data layer, app logic layer, load-balancing layer) web application into a Kubernetes cluster, and leverage Grafana Cloud’s built-in Kubernetes features for monitoring this application.

To get started, see Kubernetes Monitoring walkthrough.