Skip to content

none driver: not able to use kubectl as normal user #8673

@Lavie526

Description

@Lavie526

Steps to reproduce the issue:

  1. sudo minikube start --vm-driver=none --docker-opt="default-ulimit=core=-1" --alsologtostderr --extra-config=kubelet.cgroups-per-qos=false --extra-config=kubelet.enforce-node-allocatable=""
  2. There will be proxy issue while start minikube like how to skip download kubeadm & kubelet . because I download these in $PATH. #3846, so i tried to download those binary manually. However i found the cache folder is under the /root. Anyway i manually copy kubectl/kubelet to the default cache folder like /root/.minikube/cache/linux/v1.18.3. It finally start succesfully.
  3. I am able to run the command like sudo kubectl get nodes. However, when i run kubectl get nodes, it will show the error likes:

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:

Details Also, there are some message notify me like this:

❗ 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:

▪ sudo mv /root/.kube /root/.minikube $HOME
▪ sudo chown -R $USER $HOME/.kube $HOME/.minikube

If i try to run the above two command, then try, it still not able to run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    co/none-driverkind/bugCategorizes issue or PR as related to a bug.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.priority/backlogHigher priority than priority/awaiting-more-evidence.triage/duplicateIndicates an issue is a duplicate of other open issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions