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 update
Hang tight while we grab the latest from your chart repositories
Successfully got an update from the "pf9-plus" chart repository
Update 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 --versions
NAME CHART VERSION APP VERSION DESCRIPTION
pf9-plus/kube-prometheus-stack 38.0.4 0.57.0 kube-prometheus-stack collects Kubernetes manif
❯ helm ls
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
testmon 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-stack
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /Users/nehat/Downloads/testhelmupgrade001-kubeconfig.yaml
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /Users/nehat/Downloads/testhelmupgrade001-kubeconfig.yaml
Release "testmon" has been upgraded. Happy Helming!
NAME: testmon
LAST DEPLOYED: Tue Jun 20 15:51:54 2023
NAMESPACE: default
STATUS: deployed
REVISION: 2
NOTES:
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 AGE
monhelper-b58f65449-7rgvc 1/1 Running 0 16m
pf9-prom-operator-96f4ffdb5-vg76f 1/1 Running 0 59s
testmon-kube-state-metrics-6ddf7cbdc-b6qnc 1/1 Running 0 16m
testmon-prometheus-node-exporter-7ddmb 1/1 Running 0 16m
testmon-prometheus-node-exporter-mtbbf 1/1 Running 0 16m
❯ helm ls
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
testmon default 2 2023-06-20 15:51:54.167553 +0530 IST deployed kube-prometheus-stack-38.0.4 0.57.0
UPGRADE
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 update
Hang tight while we grab the latest from your chart repositories
Successfully got an update from the "pf9-plus" chart repository
Update Complete. ⎈Happy Helming!⎈
- Verify the new chart version is reflected in the helm search and list:
❯ helm search repo pf9-plus/kube-prometheus-stack --versions
NAME CHART VERSION APP VERSION DESCRIPTION
pf9-plus/kube-prometheus-stack 38.0.4 0.57.0 kube-prometheus-stack collects Kubernetes manif
pf9-plus/kube-prometheus-stack 38.0.2 0.57.0 kube-prometheus-stack collects Kubernetes manif
❯ helm ls
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
testmon 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-stack
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /Users/nehat/Downloads/testhelmupgrade001-kubeconfig.yaml
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /Users/nehat/Downloads/testhelmupgrade001-kubeconfig.yaml
Release "testmon" has been upgraded. Happy Helming!
NAME: testmon
LAST DEPLOYED: Tue Jun 20 15:51:54 2023
NAMESPACE: default
STATUS: deployed
REVISION: 2
NOTES:
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 AGE
monhelper-b58f65449-7rgvc 1/1 Running 0 16m
pf9-prom-operator-96f4ffdb5-vg76f 1/1 Running 0 59s
testmon-kube-state-metrics-6ddf7cbdc-b6qnc 1/1 Running 0 16m
testmon-prometheus-node-exporter-7ddmb 1/1 Running 0 16m
testmon-prometheus-node-exporter-mtbbf 1/1 Running 0 16m
❯ helm ls
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
testmon default 2 2023-06-20 15:51:54.167553 +0530 IST deployed kube-prometheus-stack-38.0.4 0.57.0
Was this page helpful?