I encounter a issue: 1) declare hostNetwork=true for POD in a deployment, and create the deployment. 2) Declare a service with nodePort to the deployment pods
I found the nodePort cannot be accessed by serviceClusterIP:nodePort in the host which the pod is not running on.
While I remove hostnetwork=true, the serviceClusterIP:nodePort can be accessed by any host node in the cluster.
What's the worong?
My kubernetes version is listed below, I am using weave net.
# kubectl version
Client Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.1", GitCommit:"82450d03cb057bab0950214ef122b67c83fb11df", GitTreeState:"clean", BuildDate:"2016-12-14T00:57:05Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.0", GitCommit:"58b7c16a52c03e4a849874602be42ee71afdcab1", GitTreeState:"clean", BuildDate:"2016-12-12T23:31:15Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"linux/amd64"}