-
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: minikube shouldn't write binaries to /usr/bin #3718
Comments
I think it is perfectly reasonable to install https://kubernetes.io/docs/setup/independent/install-kubeadm/#installing-kubeadm-kubelet-and-kubectl After all, the VM you give to minikube is dedicated to running kubernetes on. https://github.com/kubernetes/minikube/blob/master/docs/vmdriver-none.md |
Could install to |
You probably mean "/usr/bin/kubelet" here ? We don't install kubectl - yet. |
Using /usr/bin violates both user expectations and the LSB/FHS standards: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s09.html The main user expectation violated is that we may be overwriting system binaries. Storing files in /usr/bin also conflicts with the goal of reducing/removing usage of 'minikube' by the root user: #3138 |
@tstromberg : I guess I am still thinking about the old/existing implementation, when you run Maybe we could use the binaries straight off the cache, rather than copying them to a temp location ? |
Is there a workaround for now? |
Suppose you could store the old files, and then restore/reinstall them after minikube ? |
I did some prototyping where the binaries are stored in /data/minikube, and it worked great. The plus side is that it's persistent across reboots, which speeds up minikube. |
I also think having it in /usr/bin is a bad idea, since many corporates deny access to that folder but they allow /usr/loca/bin |
Normally this is because Note that for the current release, we could run them right off the cache (now made executable) $ ~/.minikube/cache/v1.15.0/kubeadm version
kubeadm version: &version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.0", GitCommit:"e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529", GitTreeState:"clean", BuildDate:"2019-06-19T16:37:41Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
$ ~/.minikube/cache/v1.15.0/kubelet --version
Kubernetes v1.15.0 It's not in the PATH though, and there are some changes needed to the created startup scripts: |
well do you agree that the minikube.deb package could write to /usr/bin
Is that correct ? I can open a PR to fix this The nicer way would be to use alternatives links. BTW, way isnt minikube.deb in same repo as other k8 debs ? |
The minikube.deb will install For the So far, minikube has just pulled the static binaries - and installed them to https://storage.googleapis.com/kubernetes-release/release/v1.15.1/bin/linux/amd64/kubeadm The "other" kubeadm.deb would be this one: kubeadm_1.15.1-00_amd64_*.deb https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/ Theoretically it could use the deb and rpm packages - on the supported platforms ? And then continue to use the static binaries, on non-ubuntu and non-centos distros. It's all for show anyway, since it is the same binary packaged in several multiple ways.
One benefit with our approach is that we can have multiple versions - at the same time. |
Fix merged to head. |
With the
none
driver, minikube will overwrite the following system paths:Basically, anywhere else is better, but to write directly to /usr/bin feels yucky. It'd be nicer to write the binaries somewhere else, preferably but not necessarily versioned. For instance:
$XDG_CACHE_HOME/minikube/binaries/kubeadm-v1.13.0
Or:
/usr/local/minikube/kubeadm-v1.13.0
The text was updated successfully, but these errors were encountered: