-
Notifications
You must be signed in to change notification settings - Fork 4.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
Make the kubelet hostPort feature usable by default #3056
Comments
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
I use latest minikube version: v1.0.1, with k8s 1.3.5 |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
I believe this is still likely an issue - so PR's welcome. I don't know much about CNI, but this is where the file is apparently generated:
|
/assign |
@tstromberg before I go too deep perhaps someone can explain why the hostPort feature appears to work for the ingress plugin but not for any other pods? Some type of special nginx witchcraft? |
@woodcockjosh do you we still consider this ? |
@woodcockjosh are you still interested in doing this task ? |
this issue is free for anyone who is interested to pick it up |
Is this a BUG REPORT or FEATURE REQUEST? (choose one): FEATURE REQUEST
Please provide the following details:
Environment: Debian stretch
Minikube version (use
minikube version
): v0.28.0cat ~/.minikube/machines/minikube/config.json | grep DriverName
): kvm2cat ~/.minikube/machines/minikube/config.json | grep -i ISO
orminikube ssh cat /etc/VERSION
):What happened:
I'm enabling cni plugins for minikube by using the following command:
minikube start --vm-driver kvm2 --network-plugin=cni --extra-config=kubelet.network-plugin=cni --extra-config=kubelet.cni-conf-dir=/etc/cni/net.d --extra-config=kubelet.cni-bin-dir=/opt/cni/bin
I then want to use a pod with a hostPort, to access the pod easily from inside and outside the minikube VM.
Unfortunatly, the default cni conf file doesn't enable the "portmap" cni plugin, which enable the hostport feature.
So by default, when using cni plugins, a pod can't be accessed through a hostPort, even if it is configured.
What you expected to happen: I expect the hostPort feature to work by default.
Anything else do we need to know:
Since the portmap cni plugin is available in the minikube VM, at /opt/cni/bin, having the hostport feature enabled by default is just a matter of cni configuration file.
I removed the default /etc/cni/net.d/k8s.conf and added the file /etc/cni/net.d/10-k8s-portmap.conflist with the following content:
After restarting kubelet, a pod with hostPort enabled is accessible through minikube_ip:hostport, as expected.
The text was updated successfully, but these errors were encountered: