Are Kubernetes pods that use host networking assigned a pod IP that can be accessed using a Service resource?

1/14/2020

If a Kubernetes pod is defined with host network enabled, is the application running on this pod accessible from the Service resource using the app selector?

-- Richard
hostnetwork
kubernetes
pod

1 Answer

1/14/2020

Host network means it will use the host system's network. Services are created in pod network which is separate. So it can not be accessed that way. You can access a pod with host network directly using the IP of the host system. You should avoid using host network though for various reasons.

Here is an article to understand it more deeply.

-- Arghya Sadhu
Source: StackOverflow