Setting or Updating the Grafana Admin Password in Kubernetes with HiveMQ Operator

In this article, we will walk you through the steps to set or update the Grafana admin password in a Kubernetes cluster using the HiveMQ Operator. By default, the admin password for Grafana is set to "prom-operator." However, it is recommended to change this password for security purposes. We will also cover how to confirm the changes by logging into the Grafana dashboard.

Prerequisites

  • The Kubernetes cluster is already set up and running.

  • k8s version 1.16+ is installed

  • Helm version 3 is installed

  • The Hivemq k8s operator repo is already added in the helm repo

 Instructions

  1. Add the kube-prometheus-stack config block in your values.yaml to set Grafana admin password. Please refer following example.

    kube-prometheus-stack: grafana: adminPassword: "set your password here" hivemq: monitoring: enabled: true dedicated: true ...
  2. Deploy the changes using the following command

    helm upgrade --install -f <your values.yaml> <your deployment name> hivemq/hivemq-operator -n <namespace>
  3. That’s it. You can confirm the changes by login to the grafana dashboard.