Skip to content

Grafana

Set admin password

kubectl exec -it kube-prometheus-stack-grafana-0 -n monitoring -c grafana -- grafana cli admin reset-admin-password ""

Sync Kubernetes Secret (Prevent Configuration Drift)

Update the Kubernetes Secret so that the cluster secret matches the database password:

kubectl patch secret kube-prometheus-stack-grafana -n monitoring \
  --type='json' \
  -p='[{"op": "replace", "path": "/data/admin-password", "value": "'$(echo -n "<NEW_ADMIN_PASSWORD>" | base64)'"}]'