-
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
driver uses k8s.io/apimachinery/pkg/util/net.ChooseHostInterface()
for apiserver IP, causing problems for laptops on DHCP
#14035
Comments
The none driver is not recommended for laptops, so it is mostly used for custom virtual machines (with static IPs) A parameter to choose the interface (or address) is still reasonable, preferrably it should only listen to a local address. |
Hi @maxb, were you able to take a look at @afbjorklund's comment and did it help resolve the situation? |
Hi @maxb – is this issue still occurring? Are additional details available? If so, please feel free to re-open the issue by commenting with Additional information that may be helpful:
Thank you for sharing your experience! |
/reopen Sorry for going quiet on this one - initially I wasn't sure how to usefully and effectively challenge "The none driver is not recommended for laptops", so I took some time to think about it ... and then life got in the way and I never got back to this issue. I can see the point that the That said, for the more investigatively minded software developer / sysadmin hybrid, who wants to learn more about Kubernetes infrastructure too, as well as just use it, and is willing to put in a bit more up-front setup work to get more insight into the details, and a better end result development experience --- then I think the In particular, I've found it useful that in a
I think it could be reasonable to keep this issue open to track implementing a For reference, here is the rather clumsy workaround I came up with:/etc/systemd/network/kube0.netdev
|
@maxb: Reopened this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
The Kubernetes project currently lacks enough 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 stale |
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 |
/remove-lifecycle rotten |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What Happened?
I'm running minikube using the
none
driver on an Ubuntu laptop.minikube's
none
driver usesk8s.io/apimachinery/pkg/util/net.ChooseHostInterface()
to determine the IP address it should use in various contexts, including:control-plane.minikube.internal
in/etc/hosts
kubeconfig
This is problematic when using a laptop which will move between wifi networks, and/or acquire a different IP address from DHCP after being rebooted or hibernated.
When this happens, existing minikube clusters fail to operate correctly because the apiserver cannot be communicated with.
No configuration option is currently available to override the choice.
Whilst the current behaviour is quite reasonable for people running test labs on servers with stable networking, it's fairly unhelpful for the "personal development laptop" scenario.
I propose that there should be a way to override the IP address used by the
none
driver to represent the local machine inminikube config ...
- it might even be appropriate for it to default to a localhost IP, and only use the current autodetection on user request.I did come up with a rather arcane workaround, of creating a route to 0.0.0.0/32 (which is not a default route, because of the mask, but looks enough like a default route for
k8s.io/apimachinery/pkg/util/net
to mistake it as such) on a dummy network interface, with a dummy static IP assigned - but it's quite a hacky approach.Attach the log file
n/a
Operating System
Ubuntu
Driver
None (Baremetal)
The text was updated successfully, but these errors were encountered: