sudo: eval: command not found sudo: eval: command not found kubernetes kubernetes

sudo: eval: command not found


You use sudo eval $(minikube docker-env), sudo: eval: command not found this means eval not found. eval is an built-in in shell, so when sudo without -s it will surely tell you this error, like next:

shubuntu1@shubuntu1:~/777$ sudo evalsudo: eval: command not foundshubuntu1@shubuntu1:~/777$ sudo -s evalshubuntu1@shubuntu1:~/777$
  • If you want to execute with root account:

    $ sudo -s -H$ eval $(minikube docker-env)
  • If you just intend to execute with current account:

    $ eval $(minikube docker-env)


Ran into same issue while setting up the jenkins workflow. Below solution worked for me:

Instead of:

eval $(minikube docker-env)

Try using:

sudo -s eval $(minikube docker-env)


Others coming here could get this error for an entirely different reason as the accepted answer. In my case the minikube cluster was not running. The error you get in this case is also command not found.

Just run the command: minikube docker-env and if you get the error: The control plane node must be running for this command just start it using minikube start and re-run the command eval $(minikube docker-env). It should work this time.