简体   繁体   中英

nginx ingress pod assigning IP address of host

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM