First way is to use full path to minikube from regular user:
[ec2-user@ip-172-31-43-207 ~]$ whereis minikube
minikube: /usr/local/bin/minikube
[ec2-user@ip-172-31-43-207 ~]$ sudo /usr/local/bin/minikube start --vm-driver=none
minikube v1.4.0 on Amazon 2018.03 (xen/amd64)
Running on localhost (CPUs=2, Memory=3945MB, Disk=7997MB) ...
Second way is to put your binary to root's default bin location:
[ec2-user@ip-172-31-43-207 ~]$ sudo cp /usr/local/bin/minikube /usr/bin/
[ec2-user@ip-172-31-43-207 ~]$ sudo minikube version
minikube version: v1.4.0
commit: 7969c25a98a018b94ea87d949350f3271e9d64b6
[ec2-user@ip-172-31-43-207 ~]$ sudo minikube start --vm-driver=none
minikube v1.4.0 on Amazon 2018.03 (xen/amd64)
Running on localhost (CPUs=2, Memory=3945MB, Disk=7997MB) ...
Regarding you docker issue in comments: ideally next time this should be separate question.
Yes, reproduced and received the same error as you.
This is the problem of "Amazon Linux AMI 2018.03"
: Its clearly stated by @Vin Odh in Command not found: systemctl on Amazon Linux 2018.03 answer.
Amazon Linux AMI 2018.03
is an "Amazon Linux version 1" that does not come with systemd
, so solution is simply use another distributive that works properly, for example I had no problems with
Ubuntu Server 16.04 LTS (HVM)
ubuntu@ip-172-31-40-246:~$ sudo minikube start --vm-driver=none
minikube v1.4.0 on Ubuntu 16.04 (xen/amd64)
Running on localhost (CPUs=2, Memory=3950MB, Disk=7876MB) ...
ℹ️ OS release is Ubuntu 16.04.6 LTS
Preparing Kubernetes v1.16.0 on Docker 18.09.7 ...
Downloading kubeadm v1.16.0
Downloading kubelet v1.16.0
Pulling images ...
Launching Kubernetes ...
Configuring local host environment ...
⚠️ The 'none' driver provides limited isolation and may reduce system security and reliability.
⚠️ For more information, see:
https://minikube.sigs.k8s.io/docs/reference/drivers/none/
⚠️ kubectl and minikube configuration will be stored in /home/ubuntu
⚠️ 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 /home/ubuntu/.kube /home/ubuntu/.minikube $HOME
▪ sudo chown -R $USER $HOME/.kube $HOME/.minikube
This can also be done automatically by setting the env var CHANGE_MINIKUBE_NONE_USER=true
⌛ Waiting for: apiserver proxy etcd scheduler controller dns
Done! kubectl is now configured to use "minikube"