Answer a question

I am deploying grafana(6.6.0) in kubernetes cluster(v1.15.2) and now I want to install Pie Chart plugin in grafana. When I am not in docker, I could use this command to install:

grafana-cli plugins install grafana-piechart-panel

But now I am in kubernetes cluster, I could login to the pod and run install command, but when the pod is destroyed and recreated the installing history is lost. What should I do to permanently install plugin in the kubernetes cluster grafana? I have tried to define in yaml like this:

"name": "grafana",
            "image": "grafana/grafana:6.6.0",
            "ports": [
              {
                "name": "http",
                "containerPort": 3000,
                "protocol": "TCP"
              }
            ],
            "env": [
              {
                "name": "GF_INSTALL_PLUGINS",
                "value": "grafana-piechart-panel"
              }
            ],

and not works for me.

Answers

Adding an environment variable GF_INSTALL_PLUGINS=grafana-piechart-panel,grafana-clock-panel will install the plugins for you in the container world

Refer https://grafana.com/docs/grafana/latest/installation/docker/#install-plugins-in-the-docker-container

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐