Install Grafana Agent Flow on Kubernetes
Grafana Agent Flow can be installed on Kubernetes by using the Helm chart for Grafana Agent Flow.
Before you begin
- Ensure that you have Helm installed on your system.
- Ensure that you have a Kubernetes cluster to deploy Grafana Agent Flow to.
- Ensure that your local Kubernetes context is configured to point to the correct cluster.
NOTE: These instructions install the generic Helm chart for Grafana Agent, which can deploy Grafana Agent either in static mode or Flow mode. The Helm chart deploys Grafana Agent in Flow mode by default.
To install Grafana Agent Flow on Kubernetes using Helm, perform the following steps in a terminal:
Add the Grafana Helm chart repository:
helm repo add grafana https://grafana.github.io/helm-charts
Ensure that the Grafana Helm chart repository is up to date:
helm repo update
Install the Grafana Agent Helm chart:
helm install RELEASE_NAME grafana/grafana-agent
RELEASE_NAMEwith a name to use for your Grafana Agent Flow installation, such as
For more information on the Grafana Agent Helm chart, refer to the Helm chart on Artifact Hub.
To customize the deployment used to deploy Grafana Agent Flow on Kubernetes, perform the following steps:
Download a local copy of values.yaml for the Helm chart.
Make changes to your copy of
values.yamlto customize settings for the Helm chart.
Refer to inline documentation in the
values.yamlto understand what each option does.
Run the following command in a terminal to upgrade your Grafana Agent Flow installation:
helm upgrade RELEASE_NAME grafana/grafana-agent -f VALUES_PATH
RELEASE_NAMEwith the name you used for your Grafana Agent Flow installation.
VALUES_PATHwith the path to your copy of
If using Kustomize to inflate and install the Helm chart, be careful
when using a
configMapGenerator to generate the ConfigMap containing the
configuration. By default, the generator appends a hash to the name and patches
the resource mentioning it, triggering a rolling update.
In the case of Grafana Agent Flow, this behavior is undesirable, as the startup time can be significant depending on the size of the Write-Ahead Log. Instead, the Helm chart provides a sidecar container that will watch the ConfigMap and trigger a dynamic reload.
Here is an example snippet of a
kustomization that disables this behavior:
configMapGenerator: - name: grafana-agent files: - config.river options: disableNameSuffixHash: true