DEV Community

Discussion on: Kubernetes monitoring with Prometheus

Collapse
 
dietertroy profile image
Troy • Edited

Great write-up, but a lot of people ask the question.. how do we change the adminPassword from the default prom-operator?

I believe this will work:

helm install stable/prometheus-operator --name prometheus-operator --namespace monitor --set adminPassword=yourpassword

on first install. If you're deploying using a values.yaml file using the

-f values.yaml

argument, you can upgrade your helm chart install to receive the new password:

helm upgrade prometheus-operator stable/prometheus-operator -f values.yaml

Collapse
 
rayandasoriya profile image
Rayan Dasoriya

You can modify the password by going to prometheus-operator-grafana secrets in the monitor namespace and editing the admin-password and admin-user. Alternatively, you can also edit it by executing this command:

kubectl edit secrets prometheus-operator-grafana -n monitor

This will open up the secrets file and you can enter the base64 encoded secret values in the data field.