Minikube: The "docker" driver should not be used with root privileges.

Created on 25 Apr 2020  ยท  4Comments  ยท  Source: kubernetes/minikube


Steps to reproduce the issue:

minikube start --driver=docker
  1. Execute above command and you will see the error.


Full output of failed command:

root@fst-server-3-ubuntu-2gb-fsn1-1:~/faas-netes# minikube start --driver=docker --alsologtostderr
I0425 09:34:48.887475   24566 notify.go:125] Checking for updates...
I0425 09:34:48.999024   24566 start.go:262] hostinfo: {"hostname":"fst-server-3-ubuntu-2gb-fsn1-1","uptime":147613,"bootTime":1587652475,"procs":176,"os":"linux","platform":"ubuntu","platformFamily":"debian","platformVersion":"18.04","kernelVersion":"4.15.0-96-generic","virtualizationSystem":"","virtualizationRole":"","hostid":"0a8bb66d-63f8-47b9-b95e-6bb3ce32e001"}
I0425 09:34:48.999713   24566 start.go:272] virtualization:  
๐Ÿ˜„  minikube v1.9.2 on Ubuntu 18.04
I0425 09:34:49.001356   24566 driver.go:245] Setting default libvirt URI to qemu:///system
โœจ  Using the docker driver based on user configuration
I0425 09:34:49.140369   24566 start.go:310] selected driver: docker
I0425 09:34:49.140388   24566 start.go:656] validating driver "docker" against <nil>
I0425 09:34:49.140411   24566 start.go:662] status for docker: {Installed:true Healthy:true Error:<nil> Fix: Doc:}
I0425 09:34:49.140448   24566 start.go:1100] auto setting extra-config to "kubeadm.pod-network-cidr=10.244.0.0/16".
๐Ÿ›‘  The "docker" driver should not be used with root privileges.
๐Ÿ’ก  If you are running minikube within a VM, consider using --driver=none:
๐Ÿ“˜    https://minikube.sigs.k8s.io/docs/reference/drivers/none/
root@fst-server-3-ubuntu-2gb-fsn1-1:~/faas-netes# 

Full output of minikube start command used, if not already included:

root@fst-server-3-ubuntu-2gb-fsn1-1:~/faas-netes# minikube start
๐Ÿ˜„  minikube v1.9.2 on Ubuntu 18.04
โœจ  Automatically selected the docker driver
๐Ÿ›‘  The "docker" driver should not be used with root privileges.
๐Ÿ’ก  If you are running minikube within a VM, consider using --driver=none:
๐Ÿ“˜    https://minikube.sigs.k8s.io/docs/reference/drivers/none/
root@fst-server-3-ubuntu-2gb-fsn1-1:~/faas-netes# 
cdocker-driver kinsupport triagneeds-information

Most helpful comment

@medyagh @afbjorklund
Looks working. Thank You.

Here is the fix to make it quick.

Add new User

adduser developer
# password@7
usermod -aG sudo developer
su - developer

Login to the newly created User

su - developer
# password@7

Add User to the Docker Group

sudo groupadd docker
sudo usermod -aG docker $USER
- Re-Login or Restart the Server

Install Minicube

curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
chmod +x minikube
mv ./minikube /usr/local/bin/minikube

Start minikube with Docker Driver

minikube start --driver=docker

Verify minikube Installation

docker ps

All 4 comments

@bhushankumarl running minikube with root user is not allowed, please create a new user, and run it with that user

make sure add that user to the docker group.
https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user

@medyagh @afbjorklund
Looks working. Thank You.

Here is the fix to make it quick.

Add new User

adduser developer
# password@7
usermod -aG sudo developer
su - developer

Login to the newly created User

su - developer
# password@7

Add User to the Docker Group

sudo groupadd docker
sudo usermod -aG docker $USER
- Re-Login or Restart the Server

Install Minicube

curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
chmod +x minikube
mv ./minikube /usr/local/bin/minikube

Start minikube with Docker Driver

minikube start --driver=docker

Verify minikube Installation

docker ps

it worked for me, used above command

do not run the "minikube start" command with a root (sudo) privilege.
just run without root privilege.
this worked for me

Was this page helpful?
0 / 5 - 0 ratings