pmm-ha

by Percona

Helm chartv1.9.1App 3.11.0

A Helm chart for Percona Monitoring and Management (PMM)

About this chart

Percona Monitoring and Management (PMM) High Availability

Introduction

PMM HA is a high availability deployment of Percona Monitoring and Management (PMM), an open source database monitoring, observability and management tool. This chart provides a production-ready, scalable, and fault-tolerant PMM deployment with multiple replicas, load balancing, and operator-managed database backends.

Important: This chart works together with the pmm-ha-dependencies chart, which must be installed first to deploy the required Kubernetes operators.

Check more info here: https://docs.percona.com/percona-monitoring-and-management/index.html

Architecture

PMM HA uses a two-chart architecture:

  1. pmm-ha-dependencies: Installs Kubernetes operators (VictoriaMetrics, ClickHouse, PostgreSQL)
  2. pmm-ha (this chart): Deploys PMM servers and creates operator-managed database resources

High Availability Features

This PMM HA deployment provides the following high availability features:

  • Multiple PMM Server Replicas: Deploy 3 PMM server instances for redundancy
  • HAProxy Load Balancing: 3 HAProxy replicas spread one per node for traffic distribution
  • Operator-Managed ClickHouse Cluster: Dedicated ClickHouse cluster with 3 replicas and ClickHouse Keeper (managed by Altinity ClickHouse Operator)
  • Operator-Managed VictoriaMetrics Cluster: Distributed metrics storage with multiple replicas (managed by VictoriaMetrics Operator)
  • Operator-Managed PostgreSQL Cluster: HA PostgreSQL cluster for Grafana metadata (managed by Percona PostgreSQL Operator)
  • Pod Anti-Affinity: Ensures components are distributed across different nodes
  • Health Checks: Comprehensive readiness and liveness probes
  • TLS/SSL Support: Secure communication with configurable certificates

Prerequisites

  • Kubernetes 1.32+
  • Helm 3.17.0+ — older versions assume a Kubernetes version below 1.32 when rendering without a cluster (helm template), so they reject the chart, and versions before 3.13.0 also ignore the null entries in values.yaml that keep the HAProxy stats port off the pmm-ha-haproxy Service
  • PV provisioner support in the underlying infrastructure
  • A StorageClass with allowVolumeExpansion: true — every capacity correction on a running install is a PVC expansion, which is impossible without it
  • A StorageClass that applies the pod's fsGroup to new volumes, or creates them world-writable (as kind's and k3s's local-path does) - every PMM HA pod runs as a non-root user and writes its data through that group, see Storage under Pod security
  • amd64 nodes available for the PMM and ClickHouse pods — Query Analytics requires SSE4.2 and PMM Server has no native ARM64 build, so on clusters with mixed or auto-provisioned nodes (Karpenter, EKS Auto Mode, Graviton pools) those pods need kubernetes.io/arch: amd64
  • Required Kubernetes Operators (must be installed BEFORE this chart):
    • Install via pmm-ha-dependencies chart (recommended), OR
    • Install manually (advanced):
      • VictoriaMetrics Operator (v0.67.3+)
      • Altinity ClickHouse Operator (v0.27.3+)
      • Percona PostgreSQL Operator (v3.1.0+)

Sizing

The chart's resource defaults target roughly 100 monitored nodes and need about 17 CPU, 40Gi of memory and 465Gi of storage in requests — three workers of 8 vCPU / 32Gi.

Retention is the single largest lever on the footprint. dataRetentionDays (30 days by default) sets it for metrics and Query Analytics alike, see Data retention. The default 50Gi vmstorage volume holds roughly those 30 days at 100 nodes, so longer retention needs a larger volume.

For larger fleets:

helm install pmm-ha percona/pmm-ha -f examples/values-500-nodes.yaml
helm install pmm-ha percona/pmm-ha -f examples/values-1000-nodes.yaml
# OpenShift (restricted-v2 SCC), see "Installing on OpenShift"
helm install pmm-ha percona/pmm-ha -f examples/values-openshift.yaml

See docs/SIZING.md for the model behind these numbers, the per-component tables, and how to measure the constants on your own install.

Installing the Chart

PMM HA requires three Kubernetes operators to be installed before deployment. You can install them either:

  • Option A: Using the pmm-ha-dependencies chart (recommended, simpler)
  • Option B: Installing operators manually (advanced, more control)

Option A: Install Using pmm-ha-dependencies Chart (Recommended)

Step 1: Install Operators

helm repo add percona https://percona.github.io/percona-helm-charts/
helm repo update

# Install the operators
helm install pmm-ha-operators percona/pmm-ha-dependencies --namespace pmm --create-namespace

# Wait for operators to be ready
kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=victoria-metrics-operator -n pmm --timeout=300s
kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=altinity-clickhouse-operator -n pmm --timeout=300s
kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=pg-operator -n pmm --timeout=300s

Step 2: Install PMM HA

Once all operators are ready, install the chart:

# Install PMM HA
helm install pmm-ha percona/pmm-ha --namespace pmm

Option B: Install Operators Manually (Advanced)

If you prefer to manage operators independently or need custom configurations:

Step 1: Install VictoriaMetrics Operator

helm repo add vm https://victoriametrics.github.io/helm-charts/
helm repo update

helm install victoria-metrics-operator vm/victoria-metrics-operator \
  --namespace pmm \
  --create-namespace \
  --set admissionWebhooks.enabled=true

Step 2: Install Altinity ClickHouse Operator

helm repo add altinity https://helm.altinity.com
helm repo update

helm install clickhouse-operator altinity/altinity-clickhouse-operator \
  --namespace pmm

Step 3: Install Percona PostgreSQL Operator

helm install postgres-operator percona/pg-operator \
  --namespace pmm

Step 4: Verify All Operators Are Ready

kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=victoria-metrics-operator -n pmm --timeout=300s
kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=altinity-clickhouse-operator -n pmm --timeout=300s
kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=pg-operator -n pmm --timeout=300s

Step 5: Install PMM HA

helm install pmm-ha percona/pmm-ha --namespace pmm

The command deploys PMM HA on the Kubernetes cluster with the default high availability configuration. The Parameters section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Important: For production deployments, you must create the pmm-secret manually before installation since secret.create is set to false by default. See the Creating PMM Secret Manually section for detailed examples.

Installing into multiple namespaces

You can run more than one PMM-HA instance on the same cluster (e.g. a disaster-recovery / restore target, or an isolated test instance). Install the operators once and give each instance a distinct Helm release name — see Multi-namespace support in the pmm-ha-dependencies chart for the operator side and the release-name requirement.

This section covers the per-instance settings that are specific to the pmm-ha chart.

Monitoring sub-charts. kube-state-metrics and prometheus-node-exporter behave differently here, so they need separate decisions:

  1. prometheus-node-exporter — disable on additional instances. It uses host networking on port 9100, so only one set can run per node; a second DaemonSet's pods fail to start. Install it with the first instance only.
  2. kube-state-metrics — optional. Its resources are named after the release, so a second instance can run its own copy without colliding. Keep it if you want object-state metrics in the secondary instance, or disable it to save a small Deployment.

Whatever you disable is simply not collected by that instance: each instance's vmagent scrapes only its own namespace, so a secondary instance does not reuse the first's agents — those metrics live only in the first instance's VictoriaMetrics. (Basic node/container metrics from the kubelet and cadvisor scrape jobs are still collected either way, since those discover nodes cluster-wide.) For a DR / restore target this is usually fine, since cluster-level metrics aren't part of the restored data.

OpenShift: with nodeExporter.mode: openshift (see Using OpenShift's node exporter) the node-exporter scrape job targets the platform exporter in the openshift-monitoring namespace rather than the release namespace, so every instance still collects node metrics. Set that mode on each instance. In this mode prometheus-node-exporter.enabled: false is required on every instance — including the first — since the bundled DaemonSet would collide with OpenShift's platform node-exporter on host port 9100; the chart fails fast otherwise. The kube-state-metrics choice above is then the only one left.

# First instance (full stack, in namespace "pmm"):
kubectl create namespace pmm
# create the pmm-secret in this namespace first — see "Creating PMM Secret Manually"
helm install pmm-ha percona/pmm-ha -n pmm

# Additional instance (e.g. a restore/DR target in namespace "pmm-dr"):
#   - distinct release name (pmm-dr)
#   - node-exporter off (required: only one set can run per node)
#   - kube-state-metrics off (optional: drop this flag to keep object-state
#     metrics in this instance)
kubectl create namespace pmm-dr
# create the pmm-secret in pmm-dr too — see "Creating PMM Secret Manually"
helm install pmm-dr percona/pmm-ha -n pmm-dr \
  --set prometheus-node-exporter.enabled=false \
  --set kube-state-metrics.enabled=false

Note: helm install -n <namespace> does not create the namespace. Create it first (as shown) so the pmm-secret can be created there before installing.

Per-namespace resources (PMM server, PostgreSQL, ClickHouse, VictoriaMetrics, HAProxy) are namespaced and do not collide across namespaces. Remember the usual prerequisites in each namespace: create the pmm-secret (see Creating PMM Secret Manually) before installing, and ensure the namespace has access to whatever backup storage you use.

Backup and Restore

The chart ships a complete backup/restore solution for the whole PMM-HA installation (PostgreSQL, ClickHouse, VictoriaMetrics, PMM /srv, and the PMM encryption key). The orchestrator scripts are installed with the chart (mounted into the backup-tools Deployment — no manual copying) and support two targets, selected via centralBackupStorage.mode:

  • s3 (default): every component uploads directly to any S3-compatible object storage (AWS S3, MinIO, Ceph RGW, ...), authenticated with either static access keys (a Kubernetes Secret — works everywhere) or IRSA (AWS EKS only, keyless).
  • shared: every component writes to a user-provided volume — any PVC, NFS export, or pre-created PV the cluster can mount (must be RWX on multi-node clusters). The chart never provisions cloud storage itself; AWS/EFS prerequisites are documented as manual steps.

Quick start (after configuring centralBackupStorage in values). Inside the backup-tools pod the chart already exports the target and all S3 settings from your values, so no --target/--s3-* flags are needed — pass them only to override for an ad-hoc run. For the fuller copy-paste set — scheduling, running a backup or restore as a Job, a cross-namespace DR restore, and what to check when something is wrong — see docs/pmm-backup.md §0 Quick Start:

# Full backup
kubectl exec -n <namespace> deploy/<release>-backup-tools -- pmm-backup.sh backup

# List backups
kubectl exec -n <namespace> deploy/<release>-backup-tools -- pmm-backup.sh list

# Restore the latest backup (DESTRUCTIVE — scales PMM/VM down; see docs/pmm-backup.md §8)
kubectl exec -n <namespace> deploy/<release>-backup-tools -- pmm-backup.sh restore --backup-id latest --yes

Use a hostname, not an IP, as the PMM Public Address. A restore into another install (DR) brings the source's Public Address with it. With a hostname you repoint DNS at the target; with an IP you have to update it after the restore in Configuration > Settings > Advanced settings > Public address.

Scheduled backups (Kubernetes CronJob, disabled by default — enable once the target is configured; restore stays manual):

centralBackupStorage:
  schedule:
    enabled: true
    cron: "0 2 * * *"     # daily at 02:00
    retentionDays: 7      # also applies to manual `pmm-backup.sh backup` runs
    # components: ["--skip-victoriametrics"]   # empty = all four

Each scheduled run is a Kubernetes Job that executes pmm-backup.sh directly — its exit code is the Job status, kubectl logs job/... is the run log, and the pod carries karpenter.sh/do-not-disrupt for exactly the run's lifetime (nothing pins a node once the run ends). concurrencyPolicy: Forbid plus the orchestrator's per-component locks prevent overlapping runs. The CronJob is rendered on every install with backups enabled (suspended when no schedule is configured), so its jobTemplate is always available to clone: trigger the same run manually with kubectl create job --from=cronjob/<release>-backup manual-$(date +%s) -n <namespace>; for long restores use a Job too (see examples/restore-job.yaml) — see the Scheduled Backups section of docs/pmm-backup.md.

Full documentation:

  • [docs/p

Deploy pmm-ha with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has pmm-ha on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartpmm-ha is pinned at v1.9.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply