Hi, Im trying to get a ‘frontend/backend’ proxy block set up to work the same as my existing (successfully working) ‘listen’ proxy block (for kubectl access a kubernetes cluster)
The following ‘listen’ block works absolutely fine for my kubectl utility
listen k8s
bind *:8383
mode tcp
option log-health-checks
timeout client 3h
timeout server 3h
server lab11 10.43.9.1:6443 check check-ssl verify none inter 10000
server lab13 10.43.9.2:6443 check check-ssl verify none inter 10000
server lab15 10.43.9.3:6443 check check-ssl verify none inter 10000
balance roundrobin
But when i set the following ‘frontend/backend’ proxy block up to do the same, my kubectl command returns “Unable to connect to the server: http: server gave HTTP response to HTTPS client”
frontend k8s
mode tcp
bind *:8383
default_backend k8s
timeout client 3h
timeout server 3h
option log-health-checks
backend k8s
server lab11 10.43.9.1:6443 check check-ssl verify none inter 10000
server lab13 10.43.9.2:6443 check check-ssl verify none inter 10000
server lab15 10.43.9.3:6443 check check-ssl verify none inter 10000
balance roundrobin
Does anyone have any idea what im doing wrong here? As far as I was aware, I can use a ‘frontend/backend’ proxy block in the same way …am i missing some parameters ?
Any help would be greatly appreciated