Table of Contents
- Prerequisites
- 1. Add the Zabbix Community Helm Repository
- 2. Create a Namespace
- 3. Zabbix Architecture Overview
- 4. Install Zabbix with Default Values
- 5. Custom Configuration via `values.yaml`
- 6. Install with Custom Values
- 7. Verify the Deployment
- 8. Access the Zabbix UI
- 9. Post-Installation Setup
- 10. Upgrading Zabbix
- 11. Uninstalling Zabbix
- 12. Common Troubleshooting
- 13. Complete `values.yaml` Example
- 14. Useful References
Prerequisites
Before you begin, ensure the following are in place:
- Kubernetes cluster (v1.23+) with
kubectlaccess - Helm (v3.8+) — Install Helm
- kubectl configured to point to your target cluster
- A supported StorageClass available in your cluster
- Sufficient cluster resources (recommended: 4 CPU cores, 8 GB RAM minimum)
Verify your tools:
kubectl version --client
helm version
kubectl cluster-info1. Add the Zabbix Community Helm Repository
helm repo add zabbix-community https://zabbix-community.github.io/helm-zabbix
helm repo updateVerify the repo was added:
helm search repo zabbix-community/zabbix2. Create a Namespace
kubectl create namespace monitoring
# Skip if 'monitoring' already exists3. Zabbix Architecture Overview
The Zabbix Helm chart deploys the following components:
| Component | Description |
|---|---|
| Zabbix Server | Core daemon — processes collected data, triggers alerts |
| Zabbix Web | Frontend UI (Nginx + PHP-FPM) |
| Zabbix Agent (DaemonSet) | Collects metrics from each Kubernetes node |
| Zabbix Proxy (optional) | Offloads data collection for distributed environments |
| PostgreSQL | Default backend database (can use external DB) |
4. Install Zabbix with Default Values
For a quick installation with defaults:
helm install zabbix zabbix-community/zabbix \
--namespace monitoring⚠️ The default install uses an in-cluster PostgreSQL instance. For production, use an external managed database (see section 5.3).
5. Custom Configuration via values.yaml
Pull the default values first:
helm show values zabbix-community/zabbix > zabbix-values.yamlKey Configuration Sections
5.1 Zabbix Server
zabbixServer:
enabled: true
replicaCount: 1
resources:
limits:
cpu: 1000m
memory: 1Gi
requests:
cpu: 500m
memory: 512Mi
# High-availability mode (requires external DB and shared storage)
haNodes:
enabled: false5.2 Zabbix Web Frontend
zabbixWeb:
enabled: true
replicaCount: 1
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 250m
memory: 256Mi
# Zabbix server connection
ZBX_SERVER_HOST: zabbix-zabbix-server
ZBX_SERVER_PORT: "10051"
# PHP timezone
PHP_TZ: "Europe/Lisbon" # Replace with your timezone5.3 Database Configuration
Option A — In-cluster PostgreSQL (default, dev/testing only):
postgresql:
enabled: true
auth:
username: zabbix
password: "zabbix-db-password"
database: zabbix
primary:
persistence:
enabled: true
size: 20Gi
storageClass: "standard"Option B — External PostgreSQL (recommended for production):
postgresql:
enabled: false # Disable the bundled PostgreSQL
externalDB:
type: postgresql
host: your-postgres-host.example.com
port: 5432
database: zabbix
user: zabbix
password: "your-db-password"
# Or use a secret (recommended):
# existingSecret: zabbix-db-secret
# existingSecretPasswordKey: passwordCreate the external DB secret:
kubectl create secret generic zabbix-db-secret \
--from-literal=password=your-db-password \
--namespace monitoringOption C — MySQL / MariaDB backend:
postgresql:
enabled: false
mysql:
enabled: true
auth:
username: zabbix
password: "zabbix-db-password"
database: zabbix
rootPassword: "root-password"
primary:
persistence:
enabled: true
size: 20Gi
storageClass: "standard"5.4 Zabbix Agent (DaemonSet)
The agent runs on every node to collect host-level metrics:
zabbixAgent:
enabled: true
resources:
limits:
cpu: 200m
memory: 128Mi
requests:
cpu: 100m
memory: 64Mi
ZBX_SERVER_HOST: zabbix-zabbix-server
ZBX_SERVER_PORT: "10051"
ZBX_HOSTNAME: "#{POD_NAME}"
tolerations:
- key: node-role.kubernetes.io/master
effect: NoSchedule
- key: node-role.kubernetes.io/control-plane
effect: NoSchedule5.5 Zabbix Proxy (Optional)
Use the proxy component for distributed or large-scale deployments:
zabbixProxy:
enabled: false # Set to true to enable
replicaCount: 1
ZBX_PROXYMODE: "0" # 0 = active, 1 = passive
ZBX_SERVER_HOST: zabbix-zabbix-server
ZBX_SERVER_PORT: "10051"
ZBX_HOSTNAME: "zabbix-proxy-k8s"
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 250m
memory: 256Mi
db_access:
use_unified_secret: true
unified_secret_name: zabbixproxy-db-secret5.6 Ingress (Optional)
zabbixWeb:
ingress:
enabled: true
ingressClassName: nginx
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
cert-manager.io/cluster-issuer: letsencrypt-prod
hosts:
- host: zabbix.example.com
paths:
- path: /
pathType: Prefix
tls:
- secretName: zabbix-tls
hosts:
- zabbix.example.com5.7 SMTP / Email Alerting
Configure email alerting through the Zabbix Web UI after deployment:
Administration → Media Types → Email, then set:
| Field | Value |
|---|---|
| SMTP server | smtp.example.com |
| SMTP port | 587 |
| SMTP helo | example.com |
| SMTP email | zabbix@example.com |
| Security | STARTTLS |
| Authentication | Username / Password |
Alternatively, configure via environment variables in values.yaml:
zabbixServer:
extraEnv:
- name: ZBX_SMTPSERVER
value: "smtp.example.com"
- name: ZBX_SMTPPORT
value: "587"
- name: ZBX_SMTPFROM
value: "zabbix@example.com"5.8 Persistent Storage for Zabbix Server
zabbixServer:
persistence:
enabled: true
storageClass: "standard"
accessMode: ReadWriteOnce
size: 5Gi6. Install with Custom Values
helm install zabbix zabbix-community/zabbix \
--namespace monitoring \
--values zabbix-values.yamlOr override individual values inline:
helm install zabbix zabbix-community/zabbix \
--namespace monitoring \
--set zabbixWeb.PHP_TZ="Europe/Lisbon" \
--set postgresql.auth.password=zabbix-db-password \
--set postgresql.primary.persistence.size=20Gi7. Verify the Deployment
Check that all pods are running:
kubectl get pods -n monitoring -l app.kubernetes.io/instance=zabbixExpected output:
NAME READY STATUS RESTARTS AGE
zabbix-postgresql-0 1/1 Running 0 2m
zabbix-zabbix-agent-xxxxx (per node) 1/1 Running 0 2m
zabbix-zabbix-server-xxxxxxxx-xxxxx 1/1 Running 0 2m
zabbix-zabbix-web-xxxxxxxx-xxxxx 1/1 Running 0 2m
Check services:
kubectl get svc -n monitoring -l app.kubernetes.io/instance=zabbix8. Access the Zabbix UI
If you did not configure an Ingress, use port-forwarding:
kubectl port-forward -n monitoring svc/zabbix-zabbix-web 8080:80Then open your browser at: http://localhost:8080
Default credentials:
| Field | Value |
|---|---|
| Username | Admin |
| Password | zabbix |
⚠️ Change the default password immediately after first login via User Settings → Change Password.
9. Post-Installation Setup
9.1 Add Kubernetes Hosts
After login, go to Configuration → Hosts → Create Host and add your Kubernetes nodes or services as monitored hosts. Set the agent interface IP to the node’s internal IP and port 10050.
9.2 Apply Templates
Zabbix ships with built-in templates for common services. Apply them via Configuration → Hosts → select host → Templates. Useful templates include:
Linux by Zabbix agent— CPU, memory, disk, networkKubernetes nodes by HTTP— Kubernetes-native metricsPostgreSQL by Zabbix agent— Database metrics
9.3 Configure User Groups and Actions
Set up alert actions under Configuration → Actions → Trigger Actions to route notifications to the correct media (email, Slack, PagerDuty, etc.).
10. Upgrading Zabbix
helm upgrade zabbix zabbix-community/zabbix \
--namespace monitoring \
--values zabbix-values.yamlTo upgrade to a specific chart version:
helm upgrade zabbix zabbix-community/zabbix \
--namespace monitoring \
--values zabbix-values.yaml \
--version 4.0.0⚠️ Always back up your database before upgrading. Zabbix major version upgrades require sequential migration (e.g., 6.x → 6.4 → 7.0).
11. Uninstalling Zabbix
helm uninstall zabbix --namespace monitoring⚠️ This does not delete PersistentVolumeClaims. Remove them manually if needed:
kubectl delete pvc -n monitoring -l app.kubernetes.io/instance=zabbix
12. Common Troubleshooting
Zabbix Web shows “Cannot connect to the database”
kubectl logs -n monitoring -l app.kubernetes.io/component=zabbix-web- Verify the PostgreSQL pod is running and healthy
- Confirm database credentials match between the web and DB config
- Check the DB service DNS resolves correctly:
kubectl exec -it -n monitoring <zabbix-web-pod> -- nslookup zabbix-postgresql
Zabbix Server not connecting to agents
kubectl logs -n monitoring -l app.kubernetes.io/component=zabbix-server- Confirm agents are running on all nodes:
kubectl get pods -n monitoring -l app.kubernetes.io/component=zabbix-agent - Check that port
10050is reachable from the server pod - Verify
ZBX_SERVER_HOSTmatches the server’s service name
Database pod stuck in Pending
kubectl describe pod -n monitoring -l app.kubernetes.io/component=primary
kubectl get pvc -n monitoringEnsure a valid StorageClass is available:
kubectl get storageclassCheck Helm release status
helm status zabbix -n monitoring
helm get values zabbix -n monitoring13. Complete values.yaml Example
A minimal but production-oriented configuration:
zabbixServer:
enabled: true
replicaCount: 1
resources:
limits:
cpu: 1000m
memory: 1Gi
requests:
cpu: 500m
memory: 512Mi
zabbixWeb:
enabled: true
replicaCount: 1
PHP_TZ: "Europe/Lisbon"
ZBX_SERVER_HOST: zabbix-zabbix-server
ZBX_SERVER_PORT: "10051"
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 250m
memory: 256Mi
ingress:
enabled: false # Set to true and configure for production
zabbixAgent:
enabled: true
ZBX_SERVER_HOST: zabbix-zabbix-server
ZBX_SERVER_PORT: "10051"
resources:
limits:
cpu: 200m
memory: 128Mi
requests:
cpu: 100m
memory: 64Mi
tolerations:
- key: node-role.kubernetes.io/control-plane
effect: NoSchedule
zabbixProxy:
enabled: false
postgresql:
enabled: true
auth:
username: zabbix
password: "change-me"
database: zabbix
primary:
persistence:
enabled: true
size: 20Gi
storageClass: "standard"