我在Microsoft上配置了一个Kubernetes集群,并在上面安装了Grafana头盔图表。在本地计算机上的一个目录中,我有一个自定义Grafana插件,我在过去开发过,我想将它安装在运行在云上的Grafana中。
有办法吗?
发布于 2020-12-11 11:02:13
您可以使用这样的initContainer:
initContainers:
- name: local-plugins-downloader
image: busybox
command:
- /bin/sh
- -c
- |
#!/bin/sh
set -euo pipefail
mkdir -p /var/lib/grafana/plugins
cd /var/lib/grafana/plugins
for url in http://192.168.95.169/grafana-piechart-panel.zip; do
wget --no-check-certificate $url -O temp.zip
unzip temp.zip
rm temp.zip
done
volumeMounts:
- name: storage
mountPath: /var/lib/grafana您需要在吊舱中有一个名为emptyDir存储的卷,如果您使用舵机图表,这是默认的。然后它需要安装在地堑的容器上。您还需要确保grafana插件目录是/var/lib/grafana/plugins。
https://stackoverflow.com/questions/58752486
复制相似问题