This page presents an example to use the Zabbix Helm Chart. For more informations, see the README.md file.
Create or access your Kubernetes cluster and configure the kubectl
.
Install Helm 3 (Visit the requirements.md file.).
Clone this repository:
mkdir ~/mygit
cd ~/mygit
git clone https://github.com/zabbix-community/helm-zabbix
cd ~/mygit/helm-zabbix
Edit ~/mygit/helm-zabbix/charts/helm-zabbix/docs/example/kind/values.yaml
file.
Test the installation/upgrade with command (update the YAML files paths if necessary):
helm upgrade --install zabbix \
--dependency-update \
--create-namespace \
-f ~/mygit/helm-zabbix/charts/helm-zabbix/docs/example/kind/values.yaml \
zabbix-community/helm-zabbix -n monitoring --debug --dry-run
Install/upgrade Zabbix in the Kubernetes cluster (update the YAML files paths if necessary).
helm upgrade --install zabbix \
--dependency-update \
--create-namespace \
-f ~/mygit/helm-zabbix/charts/helm-zabbix/docs/example/kind/values.yaml \
zabbix-community/helm-zabbix -n monitoring --debug
View the pods.
kubectl get pods -n monitoring
After deploying the chart in your cluster, you can use the following command to access the zabbix frontend service:
View informations of zabbix
services.
kubectl describe services zabbix-web -n monitoring
Listen on port 8888 locally, forwarding to 80 in the service APPLICATION_NAME-zabbix-web
. Example:
kubectl port-forward service/zabbix-zabbix-web 8888:80 -n monitoring
Access Zabbix:
View the pods.
kubectl get pods -n monitoring
View informations of pods.
kubectl describe pods/POD_NAME -n monitoring
View all containers of pod.
kubectl get pods POD_NAME -n monitoring -o jsonpath='{.spec.containers[*].name}*'
View the logs container of pods.
kubectl logs -f pods/POD_NAME -c CONTAINER_NAME -n monitoring
Access prompt of container.
kubectl exec -it pods/POD_NAME -c CONTAINER_NAME -n monitoring -- sh
View informations of service Zabbix.
kubectl get svc -n monitoring
kubectl get pods --output=wide -n monitoring
kubectl describe services zabbix -n monitoring
To uninstall the zabbix.
helm uninstall zabbix -n monitoring
In the production environment to allow external access to Zabbix installed on Kubernetes, you can configure nginx-ingress
, but there are other similar approaches that can be used. This was just a suggestion for users new to Kubernetes.
More informations about nginx-ingress
can be found in the following tutorials.