In Kubernetes Pod will get IP address from its own isolated network namespace by default. For some purposes the Pod need to use the IP address the host node where it is running. This article is to discuss how to let pod obtain the node's IP address.
vSphere Kubernetes Service
To use IP address of node other than isolated namespace for Pod, specify the setting 'hostNetwork: true' in the yaml of Pod.
For example:
apiVersion: v1kind: Podmetadata: name: <pod-name> namespace: <pod-namespace>spec: hostNetwork: true containers: - name: <container-name> image: <image-name>