Caution
Grafana Alloy is the new name for our distribution of the OTel collector. Grafana Agent has been deprecated and is in Long-Term Support (LTS) through October 31, 2025. Grafana Agent will reach an End-of-Life (EOL) on November 1, 2025. Read more about why we recommend migrating to Grafana Alloy.
Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
Deploy Grafana Agent in static mode on Kubernetes
You can deploy Grafana Agent in static mode on Kubernetes.
Deploy
To deploy Grafana Agent in static mode on Kubernetes, perform the following steps.
Download one of the following manifests from GitHub and save it as
manifest.yaml
:- Metric collection (StatefulSet): agent-bare.yaml
- Log collection (DaemonSet): agent-loki.yaml
- Trace collection (Deployment): agent-traces.yaml
Edit the downloaded
manifest.yaml
and replace the placeholders with information relevant to your Kubernetes deployment.Apply the modified manifest file:
kubectl -n default apply -f manifest.yaml
Note
The manifests do not include theConfigMaps
which are necessary to run Grafana Agent.
For sample configuration files and detailed instructions, refer to Configure Kubernetes Monitoring in the Grafana Cloud documentation.
Rebuild the Kubernetes manifests
The manifests provided are created using Grafana Labs’ production Tanka configs with some default values. If you want to build the YAML file with some custom values, you must install the following applications:
- Tanka version 0.8 or higher
- jsonnet-bundler version 0.2.1 or higher
Refer to the template
Tanka environment for the current settings that initialize the Grafana Agent Tanka configurations.
To build the YAML files, run the /build/build.sh
script, or run make example-kubernetes
from the project’s root directory.