Installs the kube-prometheus stack, a collection of Kubernetes manifests, Grafana dashboards, and Prometheus rules combined with documentation and scripts to provide easy to operate end-to-end Kubernetes cluster monitoring with Prometheus using the Prometheus Operator.
This article is about how to use Helm to deploy kube-prometheus stack (Prometheus, Grafana) on Kubernetes (K8S).
Prerequisites
Kubernetes (K8S)
Kubernetes (K8s) is an open-source system for automating deployment, scaling, and management of containerized applications.
For more information about installing and using Kubernetes (K8s), see the Kubernetes (K8s) Docs.
Helm
Helm is the best way to find, share, and use software built for Kubernetes.
For more information about installing and using Helm, see the Helm Docs.
Installation
Custom Values.yaml
Remember to replace the content within < > with your info.
# helm-charts/values.yaml at main · prometheus-community/helm-charts # https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-prometheus-stack/values.yaml
## Configuration for alertmanager ## ref: https://prometheus.io/docs/alerting/alertmanager/ ## alertmanager:
## Kubernetes Dashboard Ingress hostnames ## Must be provided if Ingress is enabled ## hosts: -<YourAlertmanagerHost>
## Kubernetes Dashboard Ingress TLS configuration ## Secrets must be manually created in the namespace ## tls: -secretName:cert-manager-webhook-dnspod-letsencrypt hosts: -<YourAlertmanagerHost>
## Using default values from https://github.com/grafana/helm-charts/blob/main/charts/grafana/values.yaml ## grafana:
adminPassword:<YourGrafanaPassword>
ingress: ## If true, Kubernetes Dashboard Ingress will be created. ## enabled:true
## Kubernetes Dashboard Ingress hostnames ## Must be provided if Ingress is enabled ## hosts: -<YourGrafanaHost>
## Kubernetes Dashboard Ingress TLS configuration ## Secrets must be manually created in the namespace ## tls: -secretName:cert-manager-webhook-dnspod-letsencrypt hosts: -<YourGrafanaHost>
## Deploy a Prometheus instance ## prometheus:
ingress: ## If true, Kubernetes Dashboard Ingress will be created. ## enabled:true annotations: kubernetes.io/ingress.class:nginx kubernetes.io/tls-acme:'true' cert-manager.io/acme-challenge-type:dns01 cert-manager.io/cluster-issuer:cert-manager-webhook-dnspod-cluster-issuer
## Kubernetes Dashboard Ingress hostnames ## Must be provided if Ingress is enabled ## hosts: -<YourPrometheusHost>
## Kubernetes Dashboard Ingress TLS configuration ## Secrets must be manually created in the namespace ## tls: -secretName:cert-manager-webhook-dnspod-letsencrypt hosts: -<YourPrometheusHost>
Install by Helm
Helm install kube-prometheus-stack into kube-prometheus-stack namespace.