Welcome! Log In Create A New Profile

Advanced

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

Francis Daly
January 05, 2021 12:28PM
On Tue, Jan 05, 2021 at 10:53:58AM -0500, kpirateone wrote:

Hi there,

> 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.

See, for example, the thread at https://forum.nginx.org/read.php?2,290205

In short: stock nginx does not care if the upstream service (the pod)
is running or not; but it does care that whatever hostname you use in the
"upstream" section resolves to an IP address at nginx-start time.

That thread does list a few possible ways of approaching a solution;
maybe one will work for you?

> 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.

"exist" should not matter.

"can resolve dns" does matter.

Good luck with it,

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
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: 307
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready