geerlingguy / pi-cluster

Raspberry Pi Cluster automation
MIT License
473 stars 48 forks source link

Deploy Prometheus + Grafana Helm Chart #20

Open Iril opened 2 weeks ago

Iril commented 2 weeks ago

Trying to build this on 1 x Pi4 and 3 x Pi3 to further work with kubectl and clusters. On deploy to the main node ( the Pi4 ) the ansible fails with this error.

TASK [Deploy Prometheus + Grafana Helm chart.] ********************************************************************************************************************************************** fatal: [pihat-pi4]: FAILED! => {"changed": false, "command": "/usr/local/bin/helm upgrade -i --reset-values -f=/tmp/tmp6bzcw1sc.yml cluster-monitoring 'prometheus-community/kube-prometheus-stack'", "msg": "Failure when executing Helm command. Exited 1.\nstdout: Release \"cluster-monitoring\" does not exist. Installing it now.\n\nstderr: Error: template: kube-prometheus-stack/templates/prometheus/prometheus.yaml:262:11: executing \"kube-prometheus-stack/templates/prometheus/prometheus.yaml\" at <ne .Values.prometheus.prometheusSpec.scrapeConfigNamespaceSelector nil>: error calling ne: uncomparable type map[string]interface {}: map[]\n", "stderr": "Error: template: kube-prometheus-stack/templates/prometheus/prometheus.yaml:262:11: executing \"kube-prometheus-stack/templates/prometheus/prometheus.yaml\" at <ne .Values.prometheus.prometheusSpec.scrapeConfigNamespaceSelector nil>: error calling ne: uncomparable type map[string]interface {}: map[]\n", "stderr_lines": ["Error: template: kube-prometheus-stack/templates/prometheus/prometheus.yaml:262:11: executing \"kube-prometheus-stack/templates/prometheus/prometheus.yaml\" at <ne .Values.prometheus.prometheusSpec.scrapeConfigNamespaceSelector nil>: error calling ne: uncomparable type map[string]interface {}: map[]"], "stdout": "Release \"cluster-monitoring\" does not exist. Installing it now.\n", "stdout_lines": ["Release \"cluster-monitoring\" does not exist. Installing it now."]}

Just wondered if anyone has seen this before and has any ideas. The 4 Pis are all installed with the following Rasbian release. Running over wifi. https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2024-07-04/2024-07-04-raspios-bookworm-arm64-lite.img.xz They have a hostname set that is the same as the inventory file. Any hints appreciated.

BenStreet365 commented 1 week ago

Hey, had this myself. Found the issue is with that Helm version in /tasks/kubernetes/helm.yml

Change the version from 3.8.0 to the next suitable version for yourself, I used latest being 3.16.2.