-
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: not able to use kubectl as normal user #8673
Comments
Anything wrong? How should I config to make it able to run minikube without sudo? |
Some updates-------------: It is able to start under /scratch/$USER/, and it shows minikube start succefully. However while i try to run kubectl get node with sudo or without sudo, it shows: What's the problem? |
-- /stdout -- stderr:
apiVersion: kubeadm.k8s.io/v1beta2
|
kubectl version |
Doesn't I know this is terrible but I do the following....
OR configure client via |
@mazzystr --driver=none require root, so I use sudo before start minikube. Unable to connect to the server: net/http: TLS handshake timeout I guess maybe the start is not real success, there is some information in the output log: 🌟 Enabled addons: default-storageclass, storage-provisioner Not sure if it is the issue while i can't use kubectl commands after start? |
I tried to do the trasfer, after transter. It only works with sudo, like "sudo kubectl get nodes", without sudo like "kubectl get nodes" it will report: |
...and that makes sense. Everything is going to be owned by root...all the config, all the certs, all the images, everything in Try running Or |
Yup, just as suspected. Ensure crio is installed and running. Ensure kubelet is installed and running. Then run minikube start directly as root... (I add a couple extra parameters to make my env usable)
|
@mazzystr However, my expectation is to run kubectl as a normal user, not as root. How should I make it works? |
Documentation is perfectly clear on the root requirement for |
@Lavie526 none driver is only supported with root, however I recommend using our newest driver, Docker Driver. I recommend delting the other one minikube start --driver=docker @Lavie526 does that solve your problem? meanwhile we do have a issue to implement none driver as non root, but it is not in our priority since docker driver is our preferred new driver. |
@medyagh I tried to use docker driver("minikube start --vm-driver=docker --docker-opt="default-ulimit=core=-1" --alsologtostderr --extra-config=kubelet.cgroups-per-qos=false --extra-config=kubelet.enforce-node-allocatable="" --extra-config=kubelet.cgroup-driver=systemd") as you have suggedsted above, however, there are still issues to start up: 🌐 Found network options: stderr: stderr: stderr: stderr: 💣 failed to start node: startup failed: Failed to setup kubeconfig: inspect IP bridge network "f58908572170\nb5c831a6ae16".: docker network inspect --format "{{(index .IPAM.Config 0).Gateway}}" f58908572170 stderr: 😿 minikube is exiting due to an error. If the above message is not useful, open an issue: |
If i use "minikube start --vm-driver=docker", Any suggestions? |
@medyagh Do you have any suggetions about the failure using docker driver in the above? |
[jiekong@den03fyu tmp]$ minikube logs ==> container status <== ==> describe nodes <== MemoryPressure False Tue, 21 Jul 2020 09:14:34 +0000 Tue, 21 Jul 2020 09:11:27 +0000 KubeletHasSufficientMemory kubelet has sufficient memory available kube-system kindnet-cv7kb 100m (0%) 100m (0%) 50Mi (0%) 50Mi (0%) 2m45s cpu 100m (0%) 100m (0%) Normal NodeHasSufficientMemory 3m10s (x5 over 3m10s) kubelet, minikube Node minikube status is now: NodeHasSufficientMemory ==> dmesg <== ==> etcd [0d753c127dc6] <== ==> kernel <== ==> kube-apiserver [b765c7383ac2] <== ==> kube-controller-manager [bc1da187d974] <== ==> kube-scheduler [924b96c9a517] <== ==> kubelet <== |
Hey @Lavie526 -- could you please upgrade to minikube v1.12.2 and then run the following:
if that fails, please provide the output of:
|
This sounds like a duplicate of #3760 Using |
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. |
Steps to reproduce the issue:
W0708 01:55:39.604315 22957 loader.go:223] Config not found: /scratch/jiekong/.kube/config
The connection to the server localhost:8080 was refused - did you specify the right host or port?
I have already set export CHANGE_MINIKUBE_NONE_USER=true when start minikube.
Full output of failed command:
Full output of
minikube start
command used, if not already included:Optional: Full output of
minikube logs
command:❗ The 'none' driver is designed for experts who need to integrate with an existing VM
💡 Most users should use the newer 'docker' driver instead, which does not require root!
📘 For more information, see: https://minikube.sigs.k8s.io/docs/reference/drivers/none/
❗ kubectl and minikube configuration will be stored in /root
❗ To use kubectl or minikube commands as your own user, you may need to relocate them. For example, to overwrite your own settings, run:
If i try to run the above two command, then try, it still not able to run.
The text was updated successfully, but these errors were encountered: