I am following the configurations as documented on the official page haproxy configuration in order to set an HA k8s cluster with HAProxy.
The cluster can register them self with the LB but I can see the error on the journalctl -xeu haproxy:
-- Unit haproxy.service has begun starting up. Dec 07 16:52:43 LB haproxy: /etc/rc.d/init.d/haproxy: line 26: [: =: unary operator expected Dec 07 16:52:43 LB haproxy: Starting haproxy: [WARNING] 341/165243 (28376) : config : backend 'HAControlPlaneNodes' uses http-check rules without 'option httpchk', so the rules are ignored. Dec 07 16:52:43 LB haproxy: [ OK ] Dec 07 16:52:43 LB systemd: Started SYSV: HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited for high availability environments.. -- Subject: Unit haproxy.service has finished start-up -- Defined-By: systemd
I have tried different configurations:
http-check send meth GET uri /healthz http-check expect status 200
option httpchk GET /healthz http-check expect status 200
But on both cases I am getting this error.
I am running with the latest stable version on LinuxOS:
$ haproxy -v HA-Proxy version 2.3.0-1c0a722 2020/11/05 - https://haproxy.org/ Status: stable branch - will stop receiving fixes around Q1 2022. Known bugs: http://www.haproxy.org/bugs/bugs-2.3.0.html Running on: Linux 3.10.0-1160.2.2.el7.x86_64 #1 SMP Sat Oct 17 05:06:47 UTC 2020 x86_64
Is there any recommendation on how to make the correct configuration?
According to the official documentation Check an http service I am not doing something wrong.