Prometheus and Grafana setup in Minikube 2


In this post I will show you how to deploy Prometheus and Grafana into your Minikube cluster using their provided Helm charts. Prometheus will help us monitor our Kubernetes Cluster and other resources running on it. Grafana will help us visualize metrics recorded by Prometheus and display them in fancy dashboards.


  • Minikube
  • helm

Install Prometheus

The stable channel Prometheus charts have been deprecated in favor of the Prometheus Community Kubernetes Helm Charts.

We’ll start by adding the repository to our helm configuration:

Once the repo is ready, we can install the provided charts by running the following commands:

The first command installs the charts. Since we are using Minikube, the second command exposes the prometheus-server Pod using a NodePort. This way we can now easily access the Prometheus web interface when the Pod is ready:

Prometheus Web Interface in Minikube

Install Grafana

As with Prometheus, the stable channel official Helm charts for Grafana have been deprecated. The recommended charts are the ones hosted by the Grafana Community Kubernetes Helm Charts repository.

Same as before, we’ll start by adding the repository to our helm configuration:

Next, we install Grafana by using the provided charts:

Again, since we are using Minikube, in order to easily access Grafana’s Web interface we expose the service as a NodePort.

Note: Grafana is password protected by default, in order to retrieve the admin user password we can run the following command:

We can now load the Grafana web interface using the admin user and the password retrieved:

Grafana Login Web Interface in Minikube

Configure Prometheus Datasource

Once we’re logged in to the admin interface, it’s time to configure the Prometheus Datasource.

We need to head to Configuration > Datasources and add a new Prometheus instance.

Grafana Add Prometheus Datasource

The URL for our Prometheus instance is the name of the service http://prometheus-server:80.

Kubernetes Dashboard bootstrap

Next, we’ll setup one of the many already available community provided Kubernetes Dashboards.

For this blog post I will be using this one, but you can use any other Dashboard. You can even create your own very easily, but this will be covered in another post.

We head to Create (+) > Import section to Import via and we set 6417 into the id field and clock Load.

Grafana Import Dashboard from

In the dashboard configuration we need to select the Prometheus Datasource we created in the earlier step.

Grafana import dashboard - configure Datasource

Once we confirm the Import dialog, we’ll be redirected to the new Dashboard.

Kubernetes Cluster (Prometheus)

If everything went well, you’ll be able to see your cluster’s information in the Dashboard.


In this post I’ve shown you how to install both Prometheus and Grafana into a Minikube cluster. You can use the same procedure to do the same in any Kubernetes flavored cluster. I’ve also explained how to deploy one of the community dashbaords simply by using its ID.

Hopefully this article will help you get started with Prometheus and Grafana and you’ll soon be able to create your own Dashboards and Panels.

If you’re interested in dashboards and other ways to visualize your Kubernetes cluster resources, be sure to check out YAKC – Kubernetes Dashboard.

Leave a comment

Your email address will not be published. Required fields are marked *

2 thoughts on “Prometheus and Grafana setup in Minikube