= How to manually install Grafana Plugins into the Kubernetes Helm Chart Pods = **Summary**: This wiki page shows how to manually install Grafana plugins into the Kubernetes Helm Chart Pods. \\ **Date**: 10 August 2025 \\ {{tag>grafana helm kubernetes}} In this wiki page I'll show you the steps to manually install Grafana plugins into the Kubernetes Helm Chart Pods. This includes the following steps: * Update the helm values file to allow for unsigned plugins. * Use kubectl to copy the plugin files into the pod. * Restart the Grafana pod. == Helm Values File == We'll be using the helm chart from the [[https://grafana.github.io/helm-charts |Grafana Community Kubernetes Helm Charts]] repository. The default values file can be found [[https://github.com/grafana/helm-charts/blob/main/charts/grafana/values.yaml |here]]. The value file should get updates for persistence and the name of the plugin to allow loading unsigned plugins: ```yaml persistence: enabled: true grafana.ini: plugins: allow_loading_unsigned_plugins: timeseries ``` > Note that the plugin we're installing is a custom plugin called 'timeseries'. == Use kubectl to copy the plugin files == First of all we need to know the location of the plugin files in the Grafana pod. This is done by checking the Grafana settings for the plugin path: * Go to grafana -> administration -> general -> settings -> paths -> plugins * Note that the path, {{{/var/lib/grafana/plugins}}}, is located at the PVC, which is mounted at {{{/var/lib/grafana}}}. This is important as otherwise the data would be lost on every pod restart. * Use the following command to copy the plugin zip file into the pod: {{{ kubectl cp /mnt/c/Users/sjoerd/plugin/time-series-datasource_V1.2.zip grafananamespace/grafana-pod-5678fgh89-1a2bcd:/var/lib/grafana/plugins -c grafana}}} * Note: * This command is done from [[wsl]] * Make sure to replace `grafananamespace` and `grafana-pod-5678fgh89-1a2bcd` with the actual namespace and pod name. * {{{-c grafana}}} specifies the container name in the pod, which is necessary if there are multiple containers in the pod. * Now use kubectl to enter the pod and unzip the plugin file: * {{{kubectl exec -it grafananamespace/grafana-pod-5678fgh89-1a2bcd -c grafana -- /bin/sh}}} * {{{cd /var/lib/grafana/plugins/}}} * {{{unzip time-series-datasource_V1.2.zip -d timeseries}}} * This will create a directory called 'timeseries' with the plugin files If you would do the {{{kubectl cp}}} command from a Windows powershell or cmdline you could run into errors with kubectl not recognizing the file path. To solve this, you can change your current directory to where the plugin is located and run the command with just the filename without the path. == Restart the Grafana Pod == After installing the plugin, you need to restart the Grafana pod for the changes to take effect. You can do this by scaling the deployment down to 0 and then back up to 1: ```bash kubectl scale deployment grafana --replicas=0 -n grafananamespace kubectl scale deployment grafana --replicas=1 -n grafananamespace ```