Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Latest commit

 

History

History
150 lines (108 loc) · 4.64 KB

README.md

File metadata and controls

150 lines (108 loc) · 4.64 KB

About

This page presents an example to use the Zabbix Helm Chart. For more informations, see the README.md file.

Installation

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/cetic/helm-zabbix
cd ~/mygit/helm-zabbix

Edit ~/mygit/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/docs/example/kind/values.yaml \
 cetic/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/docs/example/kind/values.yaml \
 cetic/zabbix -n monitoring --debug

View the pods.

kubectl get pods -n monitoring

How to access Zabbix

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:

Troubleshooting

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

Uninstallation

To uninstall the zabbix.

helm uninstall zabbix -n monitoring

Install nginx-ingress for services internal Kubernetes cluster

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.