1

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?

Jonas
  • 121,568
  • 97
  • 310
  • 388
Richard
  • 25
  • 1
  • 5

1 Answers1

9

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
  • 41,002
  • 9
  • 78
  • 107
  • 1
    Understood (as a note: the host network is enabled because the app in the pod also needs to process SS7 messages received over multi-homed SCTP).So if an HTTP client application running in the pod network needs to access the server application in the pod running in the host network, can I still create a Service resource without an app selector and use Endpoints (the host IPs / ports) of the server app? This would provide for the server app access across the entire Kubernetes cluster (the server app would be deployed as a DaemonSet). – Richard Jan 14 '20 at 18:45