-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HostPort Not Mapping #931
Comments
I hit a similar issue - I had originally deployed flannel 0.9 which did not support portmap plugin and then removed it and added flannel 0.10 which does include portmap plugin. |
@smorrisfv Did you find a work-around for this? I am also seeing I'm using https://github.com/coreos/flannel/blob/master/Documentation/kube-flannel.yml to install Flannel, which uses quay.io/coreos/flannel:v0.10.0-amd64. I shouldn't be running into the problem of having old 0.9 config files left over because this is on a fresh install. |
@NickMRamirez I never did find a workaround. I worked at it for a week or so then moved on to other pressing tasks and haven't come back. It is one of the last things blocking my k8s deployment. It would just not create the port on the host, I should look to see what version I'm running, but I think it was 0.1. |
got into this issue when trying to use nginx-ingress on-premises. |
News: Looks like I was missing:
Kubespray doesn't have option to deploy service-nodeport for nginx-ingress, so that should be done manually. Now tested using calico but looks like I'm could try again with flannel. |
I meet same problem k8s 1.11.5 + flannel daemonset pod hostport not mapping two DNAT to same pod -A DOCKER ! -i docker0 -p tcp -m tcp --dport 10101 -j DNAT --to-destination 10.251.90.31:10101 -A KUBE-SEP-SVXEETBGLRGRAETZ -p tcp -m comment --comment "cfglyb/cfglyb-cyzhglptqd:port1" -m tcp -j DNAT --to-destination 10.251.90.31:8080 |
It maybe docker bug , remove docker container not recycle DNAT rule -A DOCKER ! -i docker0 -p tcp -m tcp --dport 10101 -j DNAT --to-destination 10.251.90.7:10101 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
So I'm trying to get HostPorts working, but they just don't seem to work. I set them up in my deployment config on the container and they don't get mapped. I've scowered the net far and wide but there doesn't seem to be a concrete way to set things up. I've look at the merge request that is mentioned above ( kubernetes/website#5940) and it mentions the portmap documentation, that doesn't mention how to set it up either.
In terms of configuration the closest I can find is this fellow's comment and my configuration seems to match his but even now it's not clear now to make the configuration take effect.
Does anyone know of any documentation that lays out the moving parts of setting up a host port and how to set one up, and any example configuration files/commands would be useful?
Expected Behavior
hostport
configurations map a hostport.Current Behavior
Does not open a hostport
Steps to Reproduce (for bugs)
My configuration
Context
I'm trying to host Ingress on port 80, but my test container is failing to open a host port, so if it doesn't work then Ingress won't work.
Your Environment
version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.1", GitCommit:"3a1c9449a956b6026f075fa3134ff92f7d55f812", GitTreeState:"clean", BuildDate:"2018-01-04T11:52:23Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"linux/amd64"}
The text was updated successfully, but these errors were encountered: