top of page

Persisting Grafana and Prometheus Configuration Data - Kubernetes

If you install Grafana in Kubernetes, you may see that the config data in Grafana may be reset (such as admin password and dashboard configuration) when Grafana pod resets. This is because you have not set up a persistent disk attached to the Grafana during the installation. I will go over the steps to add a persistent disk to the Grafana during the installation.

 

Prerequisites

  • Kubernetes environment

  • Install kubernetes-helm

 

1. Install "nginx ingress controller"


If you use the command below, it will install the controller in "ingress-nginx" namespace. This takes an important role in the SSL integration (next article).


2. Add Prometheus and Grafana helm repo's for installation later

3. Add a namespace


The command below will add a new namespace, "monitoring".


4. Install Prometheus with a Persistent Volume


The command below will install Prometheus with a persistent volume called "default" in the "monitoring" namespace.


5. Install Grafana with a Persistent Volume and Set Admin Password


The command below will install Grafana with a persistent volume called "default" in the "monitoring" namespace. Also, this command will set the admin password.


 

That's it. You have added a persistent disk volume in Grafana. Try resetting the pod and it will persist the new admin password.

pngegg (11)_result.webp

<Raank:랑크 /> 구독 하기 : Subscribe

감사합니다! : Thanks for submitting!

©2024 by <Raank:랑크 /> Knowledge is Power

  • LinkedIn
  • YouTube
bottom of page