Kubernetes
Deploy chmonitor on Kubernetes with the vendored Helm chart or kustomize overlays, with health probes, autoscaling, and secrets management.
Run chmonitor on Kubernetes with the vendored Helm chart or raw kustomize manifests. Both use the same image (ghcr.io/chmonitor/chmonitor:vX.Y.Z), expose port 3000, run as the non-root app user (uid/gid 1001), and wire the same health probes.
Prerequisites
- A Kubernetes cluster and
kubectlcontext. - Helm 3 (for the chart) or
kubectlwith kustomize (for raw manifests). - A reachable ClickHouse endpoint with a monitoring user.
The chart is published in two registries:
| Registry | Install command |
|---|---|
| Helm repo (Cloudflare Pages) | helm repo add chmonitor https://charts.chmonitor.dev |
| OCI (GHCR) | helm install my-chm oci://ghcr.io/chmonitor/chmonitor --version X.Y.Z |
Setup
Add the repo and install
helm repo add chmonitor https://charts.chmonitor.dev
helm repo update
helm install my-chm chmonitor/chmonitor \
--set clickhouse.host="https://clickhouse.example.com:8443" \
--set clickhouse.user="monitoring" \
--set clickhouse.password="change-me"Install with a values file (optional)
helm install my-chm chmonitor/chmonitor -f values.yamlExample values.yaml:
image:
tag: "vX.Y.Z" # use the latest release tag from https://github.com/chmonitor/chmonitor/releases
clickhouse:
host: "https://clickhouse.example.com:8443"
user: "monitoring"
password: "change-me"
ingress:
enabled: true
className: nginx
hosts:
- host: chmonitor.example.com
paths:
- path: /
pathType: Prefix
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 500m
memory: 512MiUpgrade and uninstall:
helm upgrade my-chm chmonitor/chmonitor -f values.yaml
helm uninstall my-chmReplace vX.Y.Z with the latest release tag from GitHub Releases.
helm install my-chm oci://ghcr.io/chmonitor/chmonitor --version vX.Y.Z \
--set clickhouse.host="https://clickhouse.example.com:8443" \
--set clickhouse.user="monitoring" \
--set clickhouse.password="change-me"Pull and inspect the chart before installing:
helm pull oci://ghcr.io/chmonitor/chmonitor --version vX.Y.Z --untar
helm show values ./chmonitorClone the repo and install the chart directly — useful when you want to patch the chart before installing:
git clone https://github.com/chmonitor/chmonitor.git
cd chmonitor
helm install my-chm ./deploy/helm/chmonitor \
--set clickhouse.host="https://clickhouse.example.com:8443" \
--set clickhouse.user="monitoring" \
--set clickhouse.password="change-me"kubectl kustomize deploy/kubernetes/base
# Apply
kubectl apply -k deploy/kubernetes/base
kubectl port-forward svc/chmonitor 3000:3000Keep environment differences in an overlay:
# deploy/kubernetes/overlays/prod/kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: monitoring
resources:
- ../../base
images:
- name: ghcr.io/chmonitor/chmonitor
newTag: vX.Y.Z
replicas:
- name: chmonitor
count: 2Verify
kubectl port-forward svc/my-chm-chmonitor 3000:3000
# open http://localhost:3000Configure
Required: CLICKHOUSE_HOST, CLICKHOUSE_USER, CLICKHOUSE_PASSWORD (Secret, not ConfigMap).
Helm values.yaml clickhouse.* maps to those names. Extra flags: extraEnv — copy names from
apps/dashboard/.env.example.
Full list: Environment variables.
Auth: Authentication.
kubectl create secret generic chmonitor-clickhouse \
--from-literal=CLICKHOUSE_HOST='https://clickhouse.example.com:8443' \
--from-literal=CLICKHOUSE_USER='monitoring' \
--from-literal=CLICKHOUSE_PASSWORD='change-me'Clerk / dual-surface flags
CHM_AUTH_PROVIDER and CHM_CLERK_PUBLISHABLE_KEY must be present at image build time. The published GHCR image is auth none.
Health probes
- Liveness —
GET /healthz— always200while the process runs. - Readiness —
GET /api/healthz— returns503when no ClickHouse host is reachable.
Autoscaling
autoscaling:
enabled: true
minReplicas: 2
maxReplicas: 10
targetCPUUtilizationPercentage: 80The dashboard is stateless, so scaling out is safe. The readiness probe keeps traffic off pods until ClickHouse is reachable.
Secrets management
For GitOps workflows, do not commit real passwords. Use:
- External Secrets — sync from AWS Secrets Manager, GCP Secret Manager, Vault, etc.
- SOPS — encrypt secrets in Git.
- Sealed Secrets — encrypt for a specific cluster.
Upgrading
Update the image tag
Update the image tag in your values.yaml or kustomize overlay.
Apply the change
# Helm
helm upgrade my-chm ./deploy/helm/chmonitor -f values.yaml
# kustomize
kubectl apply -k deploy/kubernetes/overlays/prodVerify the rollout
kubectl rollout status deployment/chmonitorFor breaking changes between major versions, see Migrating to v0.3.
Troubleshooting
Validate the chart and manifests before applying:
helm lint ./deploy/helm/chmonitor
helm template release ./deploy/helm/chmonitor | kubeconform -strict -summary
kubectl kustomize deploy/kubernetes/base | kubeconform -strict -summaryRelated
Production checklist
Harden and validate before going live.
Authentication
Configure none / clerk / proxy auth providers.
Docker
Single-container self-host on one server.
Migrating to v0.3
Breaking changes between major versions.
Walkthrough: Deploy chmonitor on Kubernetes with Helm.