Kubernetes
DumbMonit runs on Kubernetes as one pod: the server, its bundled
VictoriaMetrics and a SQLite database in /data. A Helm chart and plain
manifests are provided.
Install with Helm
Section titled “Install with Helm”Create the instance secret first (16 characters minimum). It encrypts monitor credentials and tokens; keep it with your backups.
kubectl create namespace dumbmonitkubectl -n dumbmonit create secret generic dumbmonit-secret \ --from-literal=DUMBMONIT_SECRET="$(openssl rand -hex 24)"
helm install dumbmonit oci://ghcr.io/selfhostr/charts/dumbmonit \ --namespace dumbmonit \ --set secret.existingSecret=dumbmonit-secret \ --set agentPublicUrl=https://agents.example.com:8443Then read the one-time code for the first admin account:
kubectl -n dumbmonit logs statefulset/dumbmonit | grep -i codekubectl -n dumbmonit port-forward svc/dumbmonit 8080:8080 # https://localhost:8080Without secret.existingSecret, DumbMonit generates /data/secret.key on the
volume: back it up with the data.
Two ports, two Services
Section titled “Two ports, two Services”| Port | Service | Exposure |
|---|---|---|
| 8080 (HTTPS) | dumbmonit (ClusterIP) | Web interface. Optional Ingress. |
| 8443 (TLS 1.3 + client certificates) | dumbmonit-agents (LoadBalancer by default, or NodePort) | Agents on other networks. |
The agent channel is authenticated by mutual TLS end to end. Publish it
with a LoadBalancer or NodePort Service (set agentService.type), never
through an Ingress or a proxy that terminates TLS. Set agentPublicUrl
(DUMBMONIT_AGENT_PUBLIC_URL) to the address agents will use; recent
DumbMonit versions read it for install commands and enrolment, older images
ignore it.
DumbMonit serves HTTPS on 8080 too, so an Ingress must reach the backend over
HTTPS. The chart sets the ingress-nginx annotation
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"; adapt it to your
controller. Add the Ingress host to publicUrl/tlsNames and your controller
to trustedProxies (see HTTPS and encryption).
publicUrl: https://monit.example.comtrustedProxies: 10.42.0.0/16 # your ingress controller podsingress: enabled: true className: nginx hosts: - host: monit.example.com paths: [{path: /, pathType: Prefix}] tls: - secretName: monit-tls hosts: [monit.example.com]Storage, VictoriaMetrics, security
Section titled “Storage, VictoriaMetrics, security”persistence.size(10Gi by default) andpersistence.storageClassNameset the volume holding/data(database, secret, bundled VictoriaMetrics).- To use your own VictoriaMetrics, set
victoriametrics.externalUrl(DUMBMONIT_VM_URL); the bundled one is then not started. - The pod runs as uid 65532, with a read-only root filesystem (
/tmpis an emptyDir), no capabilities and theRuntimeDefaultseccomp profile.pingSysctllets ping monitors work without privileges. - Probes call
/api/healthover HTTPS. - Optional:
networkPolicy.enabled,podDisruptionBudget.enabled. - Any other
DUMBMONIT_*variable goes inextraEnv(see Docker for the list).
Plain manifests
Section titled “Plain manifests”Without Helm, deploy/kubernetes/
holds the same objects: dumbmonit.yaml (ServiceAccount, Services,
StatefulSet) and optional.yaml (Ingress, PodDisruptionBudget,
NetworkPolicy). Create the dumbmonit-secret Secret as above, edit the hosts,
then kubectl apply -f.
Update
Section titled “Update”helm upgrade dumbmonit oci://ghcr.io/selfhostr/charts/dumbmonit \ --namespace dumbmonit --reuse-values --version <chart version>The chart version follows DumbMonit’s release tag; the image tag defaults to it. Back up before updating (see Backup and restore).