Update Grafana Kubernetes components
The engineering team regularly pushes updates to Grafana Cloud Kubernetes Monitoring and the Grafana Agent. You must update these components manually to take advantage of any updates to Grafana dashboards, alerting & recording rules, and new Grafana Agent features.
Update dashboards, alerting rules, and recording rules
To get the latest versions of dashboards, alerting rules, and recording rules, you must uninstall and reinstall Grafana Agent.
Warning: Uninstalling Agent will delete its associated dashboard folder and alert and recording rule namespace. Any custom dashboards or alerts added to the default locations for this integration will also be removed. Be sure to save a copy of these if you’ve modified the provisioned versions.
- Click Integrations and Connections (lightning bolt in the left-hand navigation bar).
- Click on the Kubernetes Monitoring icon.
- Click Uninstall dashboards and rules.
From here, you can reinstall Agent. This will install the latest version of the Kubernetes Monitoring components into your Grafana instance.
Updating Grafana Agent
Kubernetes Monitoring also provides pre-configured Grafana Agent manifests to get you up and running quickly with Grafana Cloud.
After performing the uninstall/reinstall step described above, you’ll see the latest version of the pre-configured Agent manifests in the setup instructions.
If the Kubernetes objects have the same name and are in the same namespace, the
kubectl apply -f command will update the object to the latest version.
To replace your Grafana Agent deployment with a StatefulSet (recommended, and now the default), you can follow the instructions in the latest version of the Kubernetes setup instructions, which will update your existing Agent ConfigMap (or create it if it doesn’t exist), and create an Agent StatefulSet.
Once that’s up and running, you can delete the existing Deployment by running the following command:
kubectl delete deployment/grafana-agent
At this point you’ll have an Agent StatefulSet scraping Prometheus metrics in your cluster and shipping these to Grafana Cloud. This StatefulSet is also configured by default to collect Kubernetes events and ship these to Grafana Cloud Loki. You can disable this by modifying the StatefulSet’s ConfigMap.
The Kubernetes Monitoring configuration instructions include a step to deploy kube-state-metrics using Helm.
To upgrade the kube-state-metrics chart to the latest version, use the following command:
helm upgrade ksm prometheus-community/kube-state-metrics --set image.tag=v2.4.2 -n default
Related Grafana Cloud resources
How to set up and visualize synthetic monitoring at scale with Grafana Cloud
Learn how to use Kubernetes, Grafana Loki, and Grafana Cloud’s synthetic monitoring feature to set up your infrastructure's checks in this GrafanaCONline session.
Using Grafana Cloud to drive manufacturing plant efficiency
This GrafanaCONline session tells how Grafana helps a 75-year-old manufacturing company with product quality and equipment maintenance.