Deploy Prometheus on Kubernetes

Step-by-Step Guide to Setting Up Prometheus on Kubernetes

Helm

1.Install Helm on your local client

2.Add the Helm Stable Charts

helm repo add stable https://charts.helm.sh/stable

3.Add prometheus Helm repo

helm repo add prometheus-community https://prometheus-community.github.io/helm-charts/

4.Create Prometheus namespace

kubectl create namespace prometheus

5.Install kube-prometheus-stack

helm install stable prometheus-community/kube-prometheus-stack -n prometheus

6.Verify that Prometheus and Grafana have been installed successfully

kubectl get pods -n prometheus
kubectl get svc -n prometheus

7.If the master nodes are tainted, you need to modify the daemonset as follows

tolerations:
      - effect: NoSchedule
        operator: Exists
      - effect: NoExecute
        key: CriticalAddonsOnly
        operator: Exists
Updated on