Skip to content

How do I change the Grafana default credentials #1578

Answered by cotjoey
cotjoey asked this question in Q&A
Discussion options

You must be logged in to vote

To answer my own question, this is the only things I found so far, to change the admin password in an idempotent fashion:

GRAFANA_POD=$(kubectl get pods --selector=app=grafana -n monitoring | tail -n 1 | awk '{print $1}')
kubectl exec --stdin --namespace="monitoring" --tty $GRAFANA_POD -- /bin/bash -c "grafana-cli admin reset-admin-password $GRAFANA_ADMIN_PASSWORD"

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by cotjoey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant