Grafana.ini when using kubernetes

  • What Grafana version and what operating system are you using?
    OSS, Oracle Linux, latest version

  • What are you trying to achieve?
    We have a Grafana OSS working, no problems there. However, I am beginning to learn Kubernetes to get better HA between other things. I could setup a lab, and it works, meaning it starts and I can connect to the login page. I still have to work on deduplicate alerts for example.
    However, our current installation uses a MariaDB Database to store the configurations, an external LDAP for authentication, and several other bits that need to be changed in grafana.ini.
    The question is, how do I pass configuration items or a grafana.ini file to the application?
    I have been unable to find any instruction to achieve that.

  • How are you trying to achieve it?

  • What happened?

  • What did you expect to happen?
    I want to start the application in a Kubernetes cluster, and it should connect to the MariaDB database get our current installation (dashboards, datasources, etc).

  • Can you copy/paste the configuration(s) that you are having problems with?

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

  • Did you follow any online instructions? If so, what is the URL?
    Deploy Grafana on Kubernetes | Grafana documentation

thanks in advance!

Generally, Kubernetes uses config maps for app configuration. (Grafana supports also configuration via emv variables, so they can be also used)

There is official Grafana helm chart, which should simplify your Kubernetes Grafana deployment. It has already option for custom grafana.ini:

1 Like