Install Grafana on OVHcloud Managed Kubernetes

Find out how to install Grafana on OVHcloud Managed Kubernetes

In this tutorial we are going to guide you with the installation of Grafana on your OVHcloud Managed Kubernetes Service.

We are going to install Grafana using the Grafana helm chart.

Before you begin

This tutorial presupposes that you already have a working OVHcloud Managed Kubernetes cluster, and some basic knowledge of how to operate it. If you want to know more on those topics, please look at the OVHcloud Managed Kubernetes Service Quickstart.

You also need to have: Helm installer on your workstation and your cluster, please refer to the How to install Helm on OVHcloud Managed Kubernetes Service tutorial. Cert-manager installed and configured, please refer to the How to install Cert-manager on OVHcloud Managed Kubernetes Service tutorial. [Nginx-ingress] installed and configured, please refer to the How to install nginx ingress on OVHcloud Managed Kubernetes Service tutorial. A domain name associated to the external IP of the nginx-ingress controller, this information will be used later as [YOUR_INGRESS_URL]

Installing Grafana

Installing the Grafana chart

In order to install Grafana we will first add the chart:

helm repo add grafana https://grafana.github.io/helm-charts
helm repo update

Customizing your install

The chart is fully configurable. In order to customize your install, without having to leave the simplicity of using helm and the Grafana helm chart, you can simply set some of the configurable parameters of the Grafana chart. We suggest the following configuration:

ingress:
  enabled: true
  annotations:
    kubernetes.io/ingress.class: nginx
    acme.cert-manager.io/http01-edit-in-place: "true"
    cert-manager.io/cluster-issuer: letsencrypt-prod
  hosts:
  - [YOUR_INGRESS_URL]
  tls:
    - hosts:
      - [YOUR_INGRESS_URL]
      secretName: grafana-tls

persistence:
  enabled: true
  type: pvc
  storageClassName: csi-cinder-high-speed
  accessModes:
  - ReadWriteOnce
  size: 4Gi
  finalizers:
  - kubernetes.io/pvc-protection

[!warn] Don't forget to update [YOUR_INGRESS_URL]

Save the content above in a file name values.yml as we will use it in the next step.

Deploying the pod

With all the settings defined in the previous step, we can install Grafana using the following command:

helm install grafana grafana/grafana -f values.yml

Please be patient while the chart is being deployed

Accessing the UI

The nginx-controller is responsible for allowing incoming traffic into the cluster. As such you can retrieve your service IP using:

kubectl get svc -w ngingress-ingress-nginx-controller
NAME                                 TYPE           CLUSTER-IP       EXTERNAL-IP      PORT(S)                      AGE
ngingress-ingress-nginx-controller   LoadBalancer   10.xxx.xxx.xxx   5x.xxx.xxx.xxx   80:30248/TCP,443:30857/TCP   138m

The external IP should be associated to a domain name record to be easier to use. With either the IP or the domain name you can access Grafana UI from your web browser.

The first login can be done with the user admin and the password generated by the chart. It can be retrieved using the following command:

kubectl get secret --namespace default grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo

Cleaning up

To clean up your cluster, simply use Helm to delete your Grafana release.

helm uninstall grafana

It will delete your Grafana and its associated resources from your cluster. ~~~~


Did you find this guide useful?

Please feel free to give any suggestions in order to improve this documentation.

Whether your feedback is about images, content, or structure, please share it, so that we can improve it together.

Your support requests will not be processed via this form. To do this, please use the "Create a ticket" form.

Thank you. Your feedback has been received.


These guides might also interest you...

OVHcloud Community

Access your community space. Ask questions, search for information, post content, and interact with other OVHcloud Community members.

Discuss with the OVHcloud community