nginx ingress pod assigning IP address of host

9/6/2017

I have server with 2 nic's. Internet<--->kube-worker<--->internal network<---->kube-master.

After I've applied nginx ingress configuration (only change that I made, was uncomment "hostNetwork: true" field), placed here, I've faced with problem: Ngingx ingress pod assign ip address of internal network.

Because of nginx must serve client requests from Internet, it's very important to assign to pod host's external address.

And here is a question: how can I assign external address to nginx ingress pod? May be in k8s exists some annotations or I must configure network at some special way?

-- Stanislav Yurchenko
kubernetes

1 Answer

9/6/2017

with hostNetwork: true your pod does not get assigned any IP, it should see full networking of the host machine. So, if the host has internal network on eth0 and public on eth1 this is the same that your nginx pod will see from inside.

-- Radek 'Goblin' Pieczonka
Source: StackOverflow