---
title: "Configure Kubernetes Monitoring with a manual values file | Grafana Cloud documentation"
description: "Configure Kubernetes Monitoring by writing a Helm values file manually instead of using the configuration wizard."
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# Configure Kubernetes Monitoring with a manual values file

You can configure Kubernetes Monitoring without the configuration wizard by writing your own Helm values file. Both paths install the same [Grafana Kubernetes Monitoring Helm chart](https://github.com/grafana/k8s-monitoring-helm/tree/main/charts/k8s-monitoring). The wizard generates the Helm values for you, while this path gives you full control of the `values.yaml` file from the start.

## Before you begin

To configure Kubernetes Monitoring manually, you need:

- A Grafana Cloud account
- The Admin role to install alerts
- To have completed the [activation of the app](/docs/grafana-cloud/monitor-infrastructure/kubernetes-monitoring/configuration/activate/)
- A Kubernetes Cluster, environment, or fleet you want to monitor
- The `kubectl` and [Helm](https://helm.sh/) command-line tools
- Familiarity with Helm values files and the edit-then-redeploy workflow
- Familiarity with the chart’s collectors, presets, features, and destinations. Refer to [Key concepts](/docs/grafana-cloud/monitor-infrastructure/kubernetes-monitoring/configuration/helm-chart-config/helm-chart/#key-concepts).

## Install the required rules

Kubernetes Monitoring requires recording and alert rules in your Grafana Cloud stack, and these rules install through Grafana Cloud, not through Helm. In Kubernetes Monitoring, go to the **Cluster configuration** tab of the **Configuration** page, and click **Install** under **Backend Installation**. For details, refer to [Backend and distribution](/docs/grafana-cloud/monitor-infrastructure/kubernetes-monitoring/configuration/helm-chart-config/hc-config-steps/#backend-and-distribution).

## Build your values file

The chart requires four parts in your `values.yaml` file. For the full structure, refer to [Build your values](https://github.com/grafana/k8s-monitoring-helm/tree/main/charts/k8s-monitoring#build-your-values) in the chart repository.

YAML ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```yaml
cluster: # Cluster configuration, including the Cluster name
  name: <CLUSTER_NAME>

destinations:
  myPrometheus:
    type: prometheus
    url: https://<PROMETHEUS_ENDPOINT>/api/prom/push
  myLoki:
    type: loki
    url: https://<LOKI_ENDPOINT>/loki/api/v1/push

# Features to enable, which determine what data to collect
clusterMetrics:
  enabled: true
  collector: alloy-metrics # References the collector defined below
clusterEvents:
  enabled: true
  collector: alloy-singleton # References the collector defined below

# Telemetry collector definitions
collectors:
  alloy-metrics:
    presets: [clustered, statefulset] # Share scrape targets and deploy as a StatefulSet
  alloy-singleton:
    presets: [singleton] # Cluster events must run as a single instance
```

- **Cluster name**: A unique name for the Cluster. This name appears in dashboards, alerts, and Cluster selectors.
- **Destinations**: Where each type of telemetry is delivered. Refer to [Destinations and proxies](/docs/grafana-cloud/monitor-infrastructure/kubernetes-monitoring/configuration/helm-chart-config/helm-chart/customize-helm-chart/#destinations-and-proxies). To authenticate to Grafana Cloud, use an [access policy token](/docs/grafana-cloud/account-management/authentication-and-permissions/access-policies/), and refer to the [authentication examples](https://github.com/grafana/k8s-monitoring-helm/tree/main/charts/k8s-monitoring/docs/examples/auth) in the chart repository.
- **Features**: What data to collect. When you define more than one collector, use each feature’s `collector` field to specify which collector it uses. Refer to [Features](/docs/grafana-cloud/monitor-infrastructure/kubernetes-monitoring/configuration/helm-chart-config/helm-chart/#features) for the full list.
- **Collectors**: The Grafana Alloy instances that gather and send your telemetry, and the presets that set their shape. A Cluster events collector requires the `singleton` preset because Cluster events must run as a single instance. Refer to the [collector reference](/docs/grafana-cloud/monitor-infrastructure/kubernetes-monitoring/configuration/helm-chart-config/helm-chart/collector-reference/).

## Install the chart

1. If you don’t already have the Grafana Helm charts repository, add it:
   
   Bash ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy
   
   ```bash
   helm repo add grafana https://grafana.github.io/helm-charts
   ```
   
   If you already have it, update it:
   
   Bash ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy
   
   ```bash
   helm repo update
   ```
2. Install the chart with your values file. Make sure your `kubectl` context points to the Cluster you want to monitor:
   
   Bash ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy
   
   ```bash
   helm upgrade --install grafana-k8s-monitoring grafana/k8s-monitoring \
     --namespace <NAMESPACE> --create-namespace \
     --values values.yaml
   ```

To install from the OCI registry instead, refer to the [chart usage documentation](https://github.com/grafana/k8s-monitoring-helm/tree/main/charts/k8s-monitoring#usage).

## Next steps

- To adjust your configuration, edit your `values.yaml` file and redeploy the chart. Refer to [Customize the Kubernetes Monitoring Helm chart](/docs/grafana-cloud/monitor-infrastructure/kubernetes-monitoring/configuration/helm-chart-config/helm-chart/customize-helm-chart/).
- To manage your collectors remotely from Grafana Cloud, register them with Fleet Management by adding the remote configuration sections to your values file. Refer to [Onboard collectors deployed in Kubernetes to Fleet Management](/docs/grafana-cloud/send-data/fleet-management/set-up/onboard-collectors/kubernetes/).
- To check the health of the data you’re ingesting, refer to the [**Metrics status** tab](/docs/grafana-cloud/monitor-infrastructure/kubernetes-monitoring/configuration/troubleshooting/#metrics-status-tool).
- If issues occur, refer to [Troubleshooting](/docs/grafana-cloud/monitor-infrastructure/kubernetes-monitoring/configuration/troubleshooting/).
