Prometheus Community Helm Charts

repository·main·Indexed 27 days ago

https://github.com/prometheus-community/helm-charts

Official Kubernetes Helm charts maintained by the Prometheus community, providing standardized deployment templates for Prometheus-related components. Includes charts for kube-prometheus-stack, Alertmanager, jiralert, and alertmanager-snmp-notifier, with support for OCI registries and traditional Helm repositories.

Tokens
58K
Snippets
240
Records
329
Agent score
91%

What's inside prometheus-community-helm-charts

  1. Migrate to Prometheus Elasticsearch Exporter v4.0.0

    main

    The chart was renamed from stable/elasticsearch-exporter to prometheus-elasticsearch-exporter. To maintain existing resource names (like Service or Deployment) during an upgrade, use fullnameOverride and nameOverride.

    Example for a release named my-exporter:

    helm upgrade my-exporter . --set fullnameOverride=my-exporter-elasticsearch-exporter --set nameOverride=elasticsearch-exporter
  2. Migrate from stable/prometheus-operator with downtime (Redeploy with new name)

    main

    To migrate and change the name prefix (which requires downtime), follow these steps. This guide assumes the deployment is in the monitoring namespace.

    1. Patch the existing PV to use a Retain reclaim policy:

      kubectl patch pv/<PersistentVolume name> -p '{"spec":{"persistentVolumeReclaimPolicy":"Retain"}}'
    2. Uninstall the old release and delete the PVC:

      helm uninstall prometheus-operator -n monitoring
      kubectl delete pvc/<PersistenceVolumeClaim name> -n monitoring

      Note: You must also manually delete the prometheus-operator-kubelet service in the kube-system namespace.

    3. Make the PV Available: Remove the spec.claimRef from the PV so it can be re-bound:

      kubectl patch pv/<PersistentVolume name> --type json -p='[{"op": "remove", "path": "/spec/claimRef"}]' -n monitoring
    4. Fresh Installation: Install kube-prometheus-stack ensuring the volumeClaimTemplate (storage size, access modes, and storageClassName) matches your old configuration.

    Important: Ensure the new pods are scheduled in the same Availability Zone (AZ) as the old PV. You can enforce this using prometheus.prometheusSpec.nodeSelector in your values.yaml:

    nodeSelector:
      failure-domain.beta.kubernetes.io/zone: east-west-1a
  3. Upgrade kube-prometheus-stack from 43.x to 44.x

    main

    This upgrade updates Prometheus-Operator to v0.62.0, Prometheus to v2.41.0, and Thanos to v0.30.1. You must update the CRDs using kubectl apply --server-side before applying the Helm upgrade.

    Breaking Changes

    • Admission Webhooks: If you have explicitly set prometheusOperator.admissionWebhooks.failurePolicy, this value is now always used even when .prometheusOperator.admissionWebhooks.patch.enabled is true (the default).
    • Image Tags: The values for prometheusOperator.image.tag and prometheusOperator.prometheusConfigReloader.image.tag are now empty by default; the Chart.yaml appVersion field is used instead.
    kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.62.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml
    kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.62.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
    kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.62.0/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
    kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.62.0/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml
    kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.62.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml
    kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.62.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
    kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.62.0/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
    kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.62.0/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml
  4. Test the kube-prometheus-stack setup on Minikube

    main

    You can locally test the kube-prometheus-stack setup using Minikube. The configuration in the hack/minikube directory provides a way to set up components and create a working etcd scrape configuration.

    To get a local working Minikube cluster, run the commands contained in cmd.sh in the exact sequence listed within the script.

    Windows Users: If you are running on Windows, locate the commented-out section within the script and add those specific flags/commands to your minikube command to ensure compatibility.