Zabbix-server cannot connect to itself when deployed in k3s.
When setting up Zabbix-server-mysql with zabbix-web-mysql-nginx, both alpine-7.0.6, running in a k3s cluster. The Zabbix Server host always shows as offline. Logs are full of:
239:20241126:151355.417 unknown request received from "10.42.6.1": [passive checks]
I understand the meaning of this log, but it shouldn't be coming from this source IP. And setting this IP as the interface IP for the host doesn't resolve.
I have tried setting the IP in the interface settings to 127.0.0.1
I've exposed that service on the cluster with type LoadBalancer and setting the agent interface to DNS name of zabbix-server-service.utilities.svc.cluster.local. Which is the proper FQDN of the service internally to the cluster. nc -zv -u zabbix-server-service.utilities.svc.cluster.local 10051 responds as open from the shell of the server/web pod and every other deployment container in my cluster.
10.42.6.1 being the Kubernetes API IP. The container gets an IP assignment, but setting the agent to that still fails to connect.
The following env variables are set:
zabbix-server-mysql
All the usual database ones.
ZBX_LISTENPORT=10051
ZBX_LISTENIP=0.0.0.0/0
I've also adjusted the Kubernetes service to have
External Traffic Policy: Local
Internal Traffic Policy: Local (same behavior with Cluster)
Zabbix monitoring using the Kubernetes monitoring method via a zabbix-proxy pod works just fine. All other external hosts are able to check in to the server and communicate.
OS / ENVIRONMENT
k3s cluster running in Debian 12.
STEPS TO REPRODUCE
Deploy zabbix-server-mysql/zabbix-web-mysql-nginx:alpine-7.0.6. Once active, Zabbix Server host will not connect to check itself.
EXPECTED RESULTS
Zabbix server to show green in the web interface for the ZBX agent connection.
SUMMARY
Zabbix-server cannot connect to itself when deployed in k3s.
When setting up Zabbix-server-mysql with zabbix-web-mysql-nginx, both
alpine-7.0.6
, running in a k3s cluster. The Zabbix Server host always shows as offline. Logs are full of:I understand the meaning of this log, but it shouldn't be coming from this source IP. And setting this IP as the interface IP for the host doesn't resolve. I have tried setting the IP in the interface settings to
127.0.0.1
I've exposed that service on the cluster with typeLoadBalancer
and setting the agent interface to DNS name ofzabbix-server-service.utilities.svc.cluster.local
. Which is the proper FQDN of the service internally to the cluster.nc -zv -u zabbix-server-service.utilities.svc.cluster.local 10051
responds as open from the shell of the server/web pod and every other deployment container in my cluster. 10.42.6.1 being the Kubernetes API IP. The container gets an IP assignment, but setting the agent to that still fails to connect.The following env variables are set:
zabbix-server-mysql All the usual database ones.
I've also adjusted the Kubernetes service to have
Zabbix monitoring using the Kubernetes monitoring method via a zabbix-proxy pod works just fine. All other external hosts are able to check in to the server and communicate.
OS / ENVIRONMENT
k3s cluster running in Debian 12.
STEPS TO REPRODUCE
Deploy zabbix-server-mysql/zabbix-web-mysql-nginx:alpine-7.0.6. Once active, Zabbix Server host will not connect to check itself.
EXPECTED RESULTS
Zabbix server to show green in the web interface for the ZBX agent connection.