ObservabilityPrometheus
Monitor Kubernetes with kube-prometheus-stack
The kube-prometheus-stack chart installs the Prometheus Operator, Prometheus, Alertmanager, Grafana, kube-state-metrics and the node exporter as one release. Four of its defaults need a decision: the selector label, the CRDs, the storage and the control plane targets.

What the chart installs
The chart's README says it installs the core components of the kube-prometheus stack. Rendering chart version 93.9.0 with helm template shows what that means:
- the Prometheus Operator, with its custom resource definitions (CRDs), such as
Prometheus,Alertmanager,ServiceMonitor,PodMonitorandPrometheusRule - one Prometheus object and one Alertmanager object, each with one replica. The operator deploys a StatefulSet for each.
- kube-state-metrics, the node exporter and Grafana, as dependent charts that you can switch off with
kubeStateMetrics.enabled,nodeExporter.enabledandgrafana.enabled - Grafana dashboards, and default alerting and recording rules
- ServiceMonitors for the kubelet, the API server, CoreDNS, kube-proxy, the controller manager, the scheduler and etcd
The README adds that the chart does not install the Prometheus Adapter or the blackbox exporter, and that the operator does not support annotation-based discovery such as prometheus.io/scrape: it uses ServiceMonitor and PodMonitor objects.
Install the chart
The chart is published as an OCI artifact and in the Helm repository at https://prometheus-community.github.io/helm-charts. Its README installs from the OCI registry:
helm show values oci://ghcr.io/prometheus-community/charts/kube-prometheus-stack
helm install monitoring \
oci://ghcr.io/prometheus-community/charts/kube-prometheus-stack \
--namespace monitoring --create-namespace \
--version <chart-version> \
--values values.yamlPin the version. The README says a major version change indicates an incompatible breaking change that needs manual actions. monitoring is the release name and namespace chosen for this page. The chart uses the release name as a label selector.
A ServiceMonitor that gets selected
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: example-app
labels:
team: frontend
release: monitoring
spec:
selector:
matchLabels:
app: example-app
endpoints:
- port: webThis is the ServiceMonitor from the Prometheus Operator's getting-started guide with one label added, release: monitoring. It validates against the ServiceMonitor CRD schema that the chart ships. selector picks Service objects by label, in the ServiceMonitor's own namespace by default. port is the name of the Service port.
The operator's guide says the Prometheus object defines which ServiceMonitors get selected, in spec.serviceMonitorSelector. With the chart's default, serviceMonitorSelectorNilUsesHelmValues: true, the rendered Prometheus object selects matchLabels of release: monitoring. A ServiceMonitor that lacks the label does not match. The README gives the other way out, two values set to false:
prometheus:
prometheusSpec:
serviceMonitorSelectorNilUsesHelmValues: false
podMonitorSelectorNilUsesHelmValues: falseWith them, helm template renders serviceMonitorSelector: {}, which the values file describes as selecting all ServiceMonitors.
On namespaces the chart's own files disagree. The README says Prometheus discovers ServiceMonitors within its namespace. The values file sets serviceMonitorNamespaceSelector: {}, the rendered Prometheus object carries it, and the operator's API reference says an empty selector matches all namespaces.
CRDs on upgrade
The chart's README says Helm v3 leaves the CRDs this chart created untouched by default, and that you should update them by hand. It points to Helm's CRD documentation, which says there is no support for upgrading or deleting CRDs using Helm.
UPGRADE.md in the chart lists, for each major version, one kubectl apply --server-side -f command per CRD, to run before the upgrade. The chart also has a job that applies the CRDs, enabled with crds.upgradeJob.enabled. The values file marks it as a preview feature that is off by default.
The README adds that CRDs are not removed when you uninstall the chart. With Argo CD, sync with ServerSideApply=true, because the CRDs are larger than the annotation limit of a client-side apply.
Storage and retention
The chart's defaults are retention: 10d and storageSpec: {}. The operator's API reference says that if no storage option is specified, an EmptyDir is used. Its storage guide adds that such volumes are not persisted when the Pods are redeployed. A volume claim template changes that:
prometheus:
prometheusSpec:
retention: 15d
retentionSize: 40GiB
storageSpec:
volumeClaimTemplate:
spec:
storageClassName: <storage-class>
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 50GiThe retention, sizes and storage class are choices made for this page. Set your own. The Prometheus documentation says that when both a time and a size retention are set, whichever triggers first is used. It recommends a retention size of at most 80 to 85% of the allocated disk, to leave room for compaction.
What managed clusters hide
kube-prometheus, the project this chart packages, states the problem in its managed-cluster addon: a managed Kubernetes cluster hides some control plane components from its customers. The addon disables the ServiceMonitors and the alert groups for the controller manager and the scheduler.
By default the chart renders Services in kube-system that select pods labeled component: kube-controller-manager and component: kube-scheduler. It also renders the alerts KubeControllerManagerDown and KubeSchedulerDown, whose expressions have the form absent(up{job="kube-scheduler"}). These values switch them off:
kubeControllerManager:
enabled: false
kubeScheduler:
enabled: falseWith them, helm template no longer renders those Services, their ServiceMonitors or the two alerts.
For clusters on Kubernetes 1.28 and above, EKS exposes scheduler and controller manager metrics under the metrics.eks.amazonaws.com API group. GKE can be configured to send API server, scheduler and controller manager metrics to Cloud Monitoring. AKS collects control plane metrics through the managed service for Prometheus in Azure Monitor.
What to check after install
- Create a ServiceMonitor with the release label in another namespace, and look for its target in the Prometheus UI. That settles the namespace question for your version.
- Add receivers. The chart's default Alertmanager configuration has one receiver, named
null, with no notification settings, and its routes all point to it. - Read
UPGRADE.mdbefore you move the version pin to a new major version.
Sources
- kube-prometheus-stack chart: README, UPGRADE.md and values.yaml
- kube-prometheus managed-cluster addon
- Getting Started (Prometheus Operator)
- API reference (Prometheus Operator)
- Storage (Prometheus)
- Fetch control plane raw metrics in Prometheus format (Amazon EKS)
- Collect and view control plane metrics (GKE)
- Monitor AKS control plane metrics
Want a second pair of eyes on yours? We do this work for a living.
More guides

Prometheus alerting rules: alert on symptoms
Observability · 4 min read
The rule file field by field, a documented error-rate rule, promtool and Alertmanager routing.

Grafana dashboards that people read
Observability · 4 min read
One question per dashboard, a fixed top row, clear units, variables, links and Git.

Helm charts: rules for charts you can maintain
GitOps · 4 min read
Documented values, a schema, shared helpers, CI checks and clean versioning for Helm charts.