Back in May, we announced the Kubernetes integration to help users easily monitor and alert on core Kubernetes cluster metrics using the Grafana Agent, our lightweight observability data collector optimized for sending metric, log, and trace data to Grafana Cloud. Since then, we’ve made some improvements to help our customers go even further.
This guide will show how easy it is to use Grafana Cloud to troubleshoot and alert on your Kubernetes cluster.
Step 1: Get the Kubernetes integration in Grafana Cloud
Setting up the integration is fast and easy. From the Grafana Cloud homepage UI, click on the lightning bolt integrations icon on the menu bar and select ‘Walkthrough’ under the Onboarding tab.
Search for Kubernetes and click install.
Step 2: Configure the Agent to scrape metrics
The Kubernetes integration works by collecting metrics via the Grafana Agent.
The Agent is configured to periodically scrape targets from your Kubernetes cluster like kubelet, cadvisor , etc., eliminating any tedious custom configuration required when using Prometheus Operator.
Use the guided configuration and code snippets provided to finish the install process.
You’ve now deployed the Agent into your cluster and configured it to scrape the kubelet and cadvisor endpoints, and you are shipping these scraped metrics to Grafana Cloud.
In addition to metrics, you can also deploy additional Agents to collect logs and traces in your Kubernetes clusters by referencing these quickstart guides:
Note: This is currently being done with manual edits to config snippet, but we hope to also make this easier in the future so stay tuned for even more configuration improvements.
Step 3: Start using Kubernetes dashboards
Once you have finished installing the integration, you will have access to a number of dashboards so you can visualize your data being scraped.
Monitor your resource consumption across clusters by visualizing key indicators such as CPU & memory utilization, requests, and limits.
Visualize the resource consumption across your namespace/workload.
High-level Kubernetes operational metrics from the Kubelet data source.
Persistent volumes dashboard
Monitor and alert on persistent volume metrics such as disk and inode usage.