Ad Widget

Collapse

Advice about running zabbix server inside a kubernetes cluster ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sp4rKy
    Junior Member
    • May 2010
    • 4

    #1

    Advice about running zabbix server inside a kubernetes cluster ?

    Hi there,

    We are deploying multiple Zabbix instances for large usecases and are thinking about moving the server/web components to kubernetes.

    We are not sure about how the server component would handle a kubernetes workload. If we focus on a node drain case, we have the following possibilities:

    1. If we do not enable the HA configuration but have 2 replica of the zabbix_server pod. AFAIK zabbix do not support to send traffic to more than one server instance at a time. So we could configure ingress to always send traffic to as single pod. But how will Zabbix support the two live server pods, even if only one at a time receive traffic ? In the case of a drain, k8s would start a third one, then stop the first one, so ingress will update backends state and send traffic to new pod.

    1.a. Same as above, but we start only server pod, not 2 replicas. But at the time of draining, the same situation (with 2 live replicas for a small time) will occur.

    2. If we *do* enable HA, only the master node will listen on port 10051 and so. So, with ingress and thanks to healthcheck, we can make sure only one pod gets traffic at a time. However, it also means ingress will always consider backend pods as "partially unhealthy" as only 1 pod will answer to HC. Also, it means the setup is not stateless anymore as replicas will have a different behavior


    1.a seems to be the more realistic usecase for me as Zabbix (6) does not seem to be made to support k8s workloads. But what will happen during the few seconds the 2 pods will be up during a drain ?

    I'm not sure if anyone thought about it / did it already ? Or is zabbix server just not made for such use-cases ?
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    You can configure multiple servers for agent.
    Server yes, if StartAgents is not explicitly set to 0 List of comma delimited IP addresses, optionally in CIDR notation, or hostnames of Zabbix servers and Zabbix proxies.
    Incoming connections will be accepted only from the hosts listed here.
    If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally and '::/0' will allow any IPv4 or IPv6 address.
    '0.0.0.0/0' can be used to allow any IPv4 address.
    Note, that "IPv4-compatible IPv6 addresses" (0000::/96 prefix) are supported but deprecated by RFC4291.
    Example: Server=127.0.0.1,192.168.1.0/24,::1,2001:db8::/32,zabbix.domain
    Spaces are allowed.
    ServerActive no List of comma-delimited IP address or DNS name (address: port) pairs or clusters (address: port;address2: port) of Zabbix servers and Zabbix proxies for active checks.
    Cluster nodes must be separated by a semicolon.
    Multiple comma-delimited addresses can be provided to use several independent Zabbix servers in parallel. Spaces are allowed.
    If port is not specified, default port is used.
    IPv6 addresses must be enclosed in square brackets if port for that host is specified.
    If port is not specified, square brackets for IPv6 addresses are optional.
    If this parameter is not specified, active checks are disabled.
    Example for multiple servers:
    ServerActive=127.0.0.1:20051,zabbix.domain,[::1]:30051,::1,[12fc::1]
    Example for high availability:
    ServerActive=zabbix.cluster.node1;zabbix.cluster.n ode2:20051;zabbix.cluster.node3
    Example for high availability with two clusters and one server:
    ServerActive=zabbix.cluster.node1;zabbix.cluster.n ode2:20051,zabbix.cluster2.node1;zabbix.cluster2.n ode2,zabbix.domain

    Comment

    • Sp4rKy
      Junior Member
      • May 2010
      • 4

      #3
      Hi cyber, thanks for your answer. However, my issue is not on the agent/proxy side, but on the server side. If we have multiple master in standalone, is this correctly supported ? That would solve our issue as we could have multiple standalone server pods, and load balancing requests to them.

      Comment

      • Sp4rKy
        Junior Member
        • May 2010
        • 4

        #4
        To give some more details, I'm looking at https://github.com/cetic/helm-zabbix...ix-server.yaml which is a stateful set. This means, with the default configuration (ie 1 replica) that only one pod of zabbix_server is started. In that case, if the node reboot for maintenance for ex, we might have a big downtime as RS will not start a new pod. If we set more than 1 replica, then we will have more than one active server, not sure if this is an issue ?

        Comment

        • cyber
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Dec 2006
          • 4807

          #5
          All that k8s stuff makes my head hurt, sorry..

          Comment

          Working...