DEV Community

Cover image for Kubernetes monitoring with Prometheus

Kubernetes monitoring with Prometheus

Rayan Dasoriya on July 25, 2019

Microservices architecture is going to be one of the essential features in software development in the coming years. Packing a large monolithic app...
Collapse
 
simbo1905 profile image
Simon Massey • Edited

Great to see a DevOps tooling post. If you like helm check out helmfile it lets you have one yaml file that describes many helm chart applications in one declarative file.

I wrote a generic helm chart that can deploys any web application in any language. We configure the one generic chart to install many different webapps via separate helmfiles in a GitHub repo. There is a webhook on the GitHub repo that will fire when any yaml changes. It runs helmfile to sync the updated app into kubenetes. So all devs need to do is push some YAML into GitHub that describes the docker image and env vars of their new app and it appears up on kubernetes on AWS. I open sourced all of the charts and scripts as ocd-scm/ocd-meta on GitHub. It’s essential built out of helmfile and some other good tools as simple glue scripts with some strong conventions.

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.