DEV Community


Deploy Prometheus monitoring stack to Kubernetes with a single Helm Chart

kaitoii11 profile image Kaito Ii ・2 min read


kube-prometheus-stack is a collection of Kubernetes manifests including the follow

  • Prometheus operator
  • Prometheus
  • Alertmanager
  • Prometheus node-exporter
  • Prometheus Adapter
  • kube-state-metrics
  • Grafana
  • pre-configured to collect metrics from all Kubernetes component
  • delivers a default set of dashboards and alerting rules


  • Kubernetes
  • Helm


$ helm repo add prometheus-community

$ kubectl create ns prom
$ helm install prometheus prometheus-community/kube-prometheus-stack -n prom

$ kubectl get all -n prom
NAME                                                         READY   STATUS    RESTARTS   AGE
pod/alertmanager-prom-kube-prometheus-stack-alertmanager-0   2/2     Running   0          2m14s
pod/prom-grafana-6c578f9954-jd4nc                            2/2     Running   0          2m15s
pod/prom-kube-prometheus-stack-operator-598f86d8d7-759tf     1/1     Running   0          2m15s
pod/prom-kube-state-metrics-85d7ddf577-bmnzz                 1/1     Running   0          2m15s
pod/prom-prometheus-node-exporter-6kf8n                      1/1     Running   0          2m16s
pod/prometheus-prom-kube-prometheus-stack-prometheus-0       2/2     Running   1          2m13s

NAME                                              TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
service/alertmanager-operated                     ClusterIP   None             <none>        9093/TCP,9094/TCP,9094/UDP   2m14s
service/prom-grafana                              ClusterIP    <none>        80/TCP                       2m16s
service/prom-kube-prometheus-stack-alertmanager   ClusterIP     <none>        9093/TCP                     2m16s
service/prom-kube-prometheus-stack-operator       ClusterIP    <none>        443/TCP                      2m16s
service/prom-kube-prometheus-stack-prometheus     ClusterIP   <none>        9090/TCP                     2m16s
service/prom-kube-state-metrics                   ClusterIP    <none>        8080/TCP                     2m16s
service/prom-prometheus-node-exporter             ClusterIP     <none>        9100/TCP                     2m16s
service/prometheus-operated                       ClusterIP   None             <none>        9090/TCP                     2m13s

NAME                                           DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
daemonset.apps/prom-prometheus-node-exporter   1         1         1       1            1           <none>          2m16s

NAME                                                  READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/prom-grafana                          1/1     1            1           2m16s
deployment.apps/prom-kube-prometheus-stack-operator   1/1     1            1           2m16s
deployment.apps/prom-kube-state-metrics               1/1     1            1           2m16s

NAME                                                             DESIRED   CURRENT   READY   AGE
replicaset.apps/prom-grafana-6c578f9954                          1         1         1       2m16s
replicaset.apps/prom-kube-prometheus-stack-operator-598f86d8d7   1         1         1       2m16s
replicaset.apps/prom-kube-state-metrics-85d7ddf577               1         1         1       2m16s

NAME                                                                    READY   AGE
statefulset.apps/alertmanager-prom-kube-prometheus-stack-alertmanager   1/1     2m14s
statefulset.apps/prometheus-prom-kube-prometheus-stack-prometheus       1/1     2m13s
Enter fullscreen mode Exit fullscreen mode

Access Prometheus Dashboard

All services are defined as ClusterIP in default configuration. To access, we are going to use port-forward. However we can edit the service or edit the value upon deployment to use NodePort or Ingress.

$ kubectl port-forward -n prom prometheus-prom-kube-prometheus-stack-prometheus-0 9090
Enter fullscreen mode Exit fullscreen mode

Access Grafana Dashboard

  • default user/password is admin/prom-operator
$ kubectl port-forward -n prom prom-grafana-6c578f9954-rjdmk 3000
Enter fullscreen mode Exit fullscreen mode


$ helm uninstall prom -n prom

Remove CRDs
$ kubectl delete crd
$ kubectl delete crd
$ kubectl delete crd
$ kubectl delete crd
$ kubectl delete crd
$ kubectl delete crd
$ kubectl delete crd
$ kubectl delete crd
Enter fullscreen mode Exit fullscreen mode

Discussion (1)

Editor guide
skiwheelr profile image
Mark Wagner

be sure to update your helm charts before installing