Get started
Prometheus is a leading open-source systems monitoring and alerting toolkit.
Before exploring the chart characteristics, let’s start by deploying the default configuration:
helm install <release-name> oci://dp.apps.rancher.io/charts/prometheus \
--set global.imagePullSecrets={application-collection}Chart overview
The Prometheus Helm chart distributed in the Application Collection deploys the Prometheus server alongside several auxiliary components to provide a comprehensive, out-of-the-box monitoring stack.
By default, the chart installs and enables the following sub-charts and components:
- Alertmanager: Handles alert routing, grouping, and notifications (
alertmanager.enabled: true). - Kube-state-metrics: Exposes cluster-level metrics from the Kubernetes API server (
kube-state-metrics.enabled: true). - Prometheus Node Exporter: Exports hardware and OS metrics from cluster nodes (
prometheus-node-exporter.enabled: true). - Prometheus Pushgateway: Allows ephemeral and batch jobs to expose their metrics (
prometheus-pushgateway.enabled: true). - Configmap Reloader: Automatically reloads the Prometheus configuration when its ConfigMap changes (
configmapReload.prometheus.enabled: true).
Chart configuration
To view the supported configuration options and documentation, run:
helm show values oci://dp.apps.rancher.io/charts/prometheusManage stack components
If you are already running certain monitoring components in your cluster or wish to maintain a lightweight installation, you can disable
specific sub-charts by adjusting the values.yaml file:
alertmanager:
enabled: false
kube-state-metrics:
enabled: false
prometheus-node-exporter:
enabled: false
prometheus-pushgateway:
enabled: falsehelm install <release-name> oci://dp.apps.rancher.io/charts/prometheus \
--set global.imagePullSecrets={application-collection} \
--values components.yamlPersistence configuration
By default, the Prometheus server relies on a Persistent Volume Claim (PVC) to retain its time-series data.
The default configuration provisions an 8Gi volume with ReadWriteOnce access mode mounted at /data.
To modify the storage size or specify a custom storageClass, provide the following values:
server:
persistentVolume:
enabled: true
size: 50Gi
storageClass: "my-storage"Scraping configurations
The chart comes pre-configured with a comprehensive list of default scrape configurations targeting common Kubernetes endpoints,
including API servers, nodes, cAdvisor, and pods. These are defined under the scrapeConfigs block.
If you need to add custom targets, such as the Prometheus Blackbox Exporter or an external application,
you can append them using the extraScrapeConfigs parameter:
extraScrapeConfigs: |
- job_name: 'my-custom-app'
metrics_path: /metrics
static_configs:
- targets:
- my-custom-app.default.svc.cluster.local:8080Expose the server (Ingress)
The Prometheus server is exposed via a ClusterIP service on port 80 by default. If you want to access the Prometheus web UI externally, you can enable and configure the Ingress resource.
Be sure to update the ingressClassName to match the Ingress controller running in your cluster (for example, nginx, traefik),
as well as the target host domain:
server:
ingress:
enabled: true
ingressClassName: "your-ingress-class"
hosts:
- prometheus.example.com
path: /
pathType: Prefixhelm install <release-name> oci://dp.apps.rancher.io/charts/prometheus \
--set global.imagePullSecrets={application-collection} \
--values ingress.yamlOperations
Upgrade the chart
In-place upgrades of your Prometheus monitoring stack can be performed using the standard Helm upgrade workflow:
helm upgrade <release-name> oci://dp.apps.rancher.io/charts/prometheus \
--reuse-valuesUninstall the chart
Removing an installed Prometheus Helm chart release is straightforward:
helm uninstall <release-name>Similar to database workloads, the Persistent Volume Claims (PVCs) generated for the Prometheus server and Alertmanagerare not immediately destroyed by Helm upon uninstallation. If you intend to permanently wipe your historical metrics and alert data, you must delete these PVCs manually.