Welcome! Log In Create A New Profile

Advanced

least_conn upstream configuration issue "host not found in upstream" with Kubernetes DNS

January 05, 2021 10:53AM
I am trying to configure a least_conn upstream for kubernetes pods and find that we receive a "host not found in upstream" error on startup if the pod has not been started.

config snippet:

upstream backend {
least_conn;

server pod0.servicename.namespace.svc.cluster.local:8081;
server pod1.servicename.namespace.svc.cluster.local:8081;
server pod2.servicename.namespace.svc.cluster.local:8081;
}

location / {
proxy_pass http://backend;
}

we would like to be able to start up nginx and use least_conn load balancing across all pods. however nginx fails to start unless all pods exist and can resolve dns.
Subject Author Posted

least_conn upstream configuration issue "host not found in upstream" with Kubernetes DNS

kpirateone January 05, 2021 10:53AM

Re: least_conn upstream configuration issue "host not found in upstream" with Kubernetes DNS

Francis Daly January 05, 2021 12:28PM

Re: least_conn upstream configuration issue "host not found in upstream" with Kubernetes DNS

kpirateone January 05, 2021 01:20PM

Re: least_conn upstream configuration issue "host not found in upstream" with Kubernetes DNS

Francis Daly January 05, 2021 02:56PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 40
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready