This is documentation for the next version of Agent. For the latest stable release, go to the latest 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:
shellkubectl -n default apply -f manifest.yaml
Note: The manifests do not include the ConfigMaps
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.