How To Install/Upgrade Prometheus Stack Using Helm Chart.
Problem
Since the customisation of promethues alert rules are not possible in prometheus stack deployed via clusteraddon, we are recommending promethues stack installation using Helm chart where user level customisations are possible.
Environment
- Platform9 Managed Kubernetes - v5.5 and Higher
- Prometheus stack without ClusterAddons
Pre-requisites
- Downloaded helm repo for the new kube-prometheus-stack from: https://platform9.github.io/pf9-kube-prometheus-helm-chart/
- Ensure monitoring clusteraddon is disabled from the UI.
Procedure
INSTALLATION
- Follow the instructions to install HELM3 and Add Prometheus Helm repo and update using:
❯ helm repo add pf9-plus https://platform9.github.io/pf9-kube-prometheus-helm-chart/❯ helm repo updateHang tight while we grab the latest from your chart repositoriesSuccessfully got an update from the "pf9-plus" chart repositoryUpdate Complete. ⎈Happy Helming!⎈- Verify the repo list for new repo chart 38.0.4 or above is reflected in the helm search:
x
❯ helm search repo pf9-plus/kube-prometheus-stack --versionsNAME CHART VERSION APP VERSION DESCRIPTIONpf9-plus/kube-prometheus-stack 38.0.4 0.57.0 kube-prometheus-stack collects Kubernetes manif❯ helm lsNAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSIONtestmon default 1 2023-06-20 15:36:45.971628 +0530 IST deployed kube-prometheus-stack-38.0.2 0.57.0- Install the latest chart(version 38.0.4 or above):
❯ helm install testmon pf9-plus/kube-prometheus-stackWARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /Users/nehat/Downloads/testhelmupgrade001-kubeconfig.yamlWARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /Users/nehat/Downloads/testhelmupgrade001-kubeconfig.yamlRelease "testmon" has been upgraded. Happy Helming!NAME: testmonLAST DEPLOYED: Tue Jun 20 15:51:54 2023NAMESPACE: defaultSTATUS: deployedREVISION: 2NOTES:kube-prometheus-stack has been installed. Check its status by running: kubectl --namespace pf9-monitoring get pods -l "release=testmon"Visit https://github.com/prometheus-operator/kube-prometheus for instructions on how to create & configure Alertmanager and Prometheus instances using the Operator.- Verify the stack installed, make sure the components are deployed/running.
❯ kubectl --namespace pf9-monitoring get pods -l "release=testmon"NAME READY STATUS RESTARTS AGEmonhelper-b58f65449-7rgvc 1/1 Running 0 16mpf9-prom-operator-96f4ffdb5-vg76f 1/1 Running 0 59stestmon-kube-state-metrics-6ddf7cbdc-b6qnc 1/1 Running 0 16mtestmon-prometheus-node-exporter-7ddmb 1/1 Running 0 16mtestmon-prometheus-node-exporter-mtbbf 1/1 Running 0 16m❯ helm lsNAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSIONtestmon default 2 2023-06-20 15:51:54.167553 +0530 IST deployed kube-prometheus-stack-38.0.4 0.57.0UPGRADE
If the Prometheus stack is already installed using helm, upgrade with the chart version using below steps:
- Download the new repo from: https://platform9.github.io/pf9-kube-prometheus-helm-chart/
- Add the repo and Update the repo using:
❯ helm repo add pf9-plus https://platform9.github.io/pf9-kube-prometheus-helm-chart/❯ helm repo updateHang tight while we grab the latest from your chart repositoriesSuccessfully got an update from the "pf9-plus" chart repositoryUpdate Complete. ⎈Happy Helming!⎈- Verify the new chart version is reflected in the helm search and list:
❯ helm search repo pf9-plus/kube-prometheus-stack --versionsNAME CHART VERSION APP VERSION DESCRIPTIONpf9-plus/kube-prometheus-stack 38.0.4 0.57.0 kube-prometheus-stack collects Kubernetes manifpf9-plus/kube-prometheus-stack 38.0.2 0.57.0 kube-prometheus-stack collects Kubernetes manif❯ helm lsNAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSIONtestmon default 1 2023-06-20 15:36:45.971628 +0530 IST deployed kube-prometheus-stack-38.0.2 0.57.0- Upgrade helm chart:
❯ helm upgrade testmon pf9-plus/kube-prometheus-stackWARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /Users/nehat/Downloads/testhelmupgrade001-kubeconfig.yamlWARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /Users/nehat/Downloads/testhelmupgrade001-kubeconfig.yamlRelease "testmon" has been upgraded. Happy Helming!NAME: testmonLAST DEPLOYED: Tue Jun 20 15:51:54 2023NAMESPACE: defaultSTATUS: deployedREVISION: 2NOTES:kube-prometheus-stack has been installed. Check its status by running: kubectl --namespace pf9-monitoring get pods -l "release=testmon"Visit https://github.com/prometheus-operator/kube-prometheus for instructions on how to create & configure Alertmanager and Prometheus instances using the Operator.- Verify the stack installed and pods are deployed/running.
❯ kubectl --namespace pf9-monitoring get pods -l "release=testmon"NAME READY STATUS RESTARTS AGEmonhelper-b58f65449-7rgvc 1/1 Running 0 16mpf9-prom-operator-96f4ffdb5-vg76f 1/1 Running 0 59stestmon-kube-state-metrics-6ddf7cbdc-b6qnc 1/1 Running 0 16mtestmon-prometheus-node-exporter-7ddmb 1/1 Running 0 16mtestmon-prometheus-node-exporter-mtbbf 1/1 Running 0 16m❯ helm lsNAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSIONtestmon default 2 2023-06-20 15:51:54.167553 +0530 IST deployed kube-prometheus-stack-38.0.4 0.57.0Was this page helpful?