-
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
none: bind to the localhost interface by default #4313
Comments
Related: #2762 |
Can I work on this issue? This would be my first contribution in k8s, might need some guidance |
@vaibhavk - Yes, I would love help on this. Much of this goes toward rectifying https://github.com/kubernetes/minikube/blob/master/docs/vmdriver-none.md#decreased-security - but in the future with Docker/Podman deployments, it will also be necessary. What I propose is that when run with the
One approach for kubelet might be to have code that adds ExtraOptions if the driver is none. See
Let me know if you would like more guidance. Feel free to reach out on Slack #minikube as well if you prefer real-time discussion. Thank you! |
@vaibhavk are you still working on this ? |
@medyagh Yes, I'm back on it |
If we bind everything to localhost on the VM, how will you access it from the developer machine ? |
This feature would be another reason why generic (#4733) is needed. The current workaround of running --vm-driver=none on a remote VM would no longer work properly after this, if it only listens on localhost. It would require you to ssh into the control plane from your developer machine, in order to reach the apiserver. It's probably a good feature for |
I've been struggling with this ... an alternative (which would work for me) is an option to specify whether minikube should take its external interface to be the host's IP address (as at present) or localhost or the docker bip gateway. At present, I can find no way to force minikube to use localhost. using I get:
I can't use the other drivers as the VMs in which I'm working have virtualisation disabled. |
/assign |
Hi.... I have a situation where I would like just the opposite. I mean, I am starting the cluster with minikube, and I would like the sockets to be bound to 0.0.0.0 so that I can access from another host. I now that minikube is not for production, and it is not my intention to use this for production, but make this bind to external IP is good for me. I am using --vm-driver=none to start the kubernetes cluster. So in short: I could I start minikube to allow it to bind to 0.0.0.0?? Any configuration file to set up to allow this?? I am just starting with Kubernetes, sorry if I don't have enough skills yet. Thanks! |
Still need this feature when there are mutilple nics. |
@vaibhavk are you still interested to do this ? |
@medyagh I recently switched to Darwin & not able to test the build, is there any work around for this? I'll be happy to work on this again and send PR |
@avisiedo opens ups big security problems,since minikbue is directed at develoipers for local kubernetes, that would be a bad default ! however I would accept any PR that would add that as an optional feature. (with extra warnning to the user that if they take the risk we could allow that) |
|
Anything new on this? I've tried to do this with iptables, but currently communication worked only in one way. In case that someone would like to use it anyway with socat I post solution below: |
@KubaJakubowski - That would be a completely different issue from binding to localhost, and well out of the scope of minikube. My personal recommendation would be an SSH tunnel, but socat would probably work as well. Alternatively, you should probably just run |
For improved security by default.
The text was updated successfully, but these errors were encountered: