-
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
validate ports provided by user to --ports flag on docker driver #10495
Comments
Hey @magnus-larsson thanks for opening this issue, it seems like a bug with our |
We did som more testing yesterday and we noticed that if we map the ports to non system ports (> 1023) it seems to work without any problems. For example, the following command works fine:
Without root privileges, we should not be able to map to system ports, I guess? We also tried Since I registered the issue, we have tried out different versions of the WSL kernel, resulting in different error symptoms when mapping to system ports. So, we guess there is some problem with the error handling somewhere (in WSL, Docker, and/or Minikube...) when trying to map to system ports without sufficient privileges. Can minikube be enhanced to throw a proper error message when the user tries to map to system ports without sufficient privileges? |
@magnus-larsson that is a great suggestion ! if we provide validation on the ports this will save a lot of other people's time to not debug this ! I would accept any PR that would do a validation on the ports specified by the user |
Hi! I'd like to work on this if possible 😄 |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
Summary
I can’t recreate minikube cluster on WSL2 when using the
--ports
option to expose ports.The
minikube start
command fails on connecting to the various ports that is sets up on the Docker container.The problem does not occur when I don’t use the
--ports
option.Workarounds:
--ports
option, then a new minikube cluster is created.Environment
Steps to reproduce the issue:
Reboot Windows without any minikube cluster created
Create minikube cluster
Delete the minikube cluster
Recreate the minikube cluster and enable logging to see the error
The command now reports errors like:
WORKAROUND Need a reliable and low latency local cluster setup for Kubernetes #1: Recreate the minikube cluster mapping the ports used by the previous minikube cluster
Lookup ports used by minikube
Sample response:
Recreate the minikube cluster and map the ports used by the previous minikube cluster
Sometimes I have to repeat this procedure a couple of times to get rid of the connection refused error
WORKAROUND Support mounting host directories into pods #2: Delete the minikube cluster and reboot Windows
Trying to avoid this workaround, but sometimes it seems to be the only way out of the problem...
NOTE: Recreating the minikube cluster without the
--ports
option works without any problem:These commands can be run multiple times without any errors:
The text was updated successfully, but these errors were encountered: