What does minikube docker-env mean?

前端 未结 2 1037
清酒与你
清酒与你 2021-02-02 05:58

In the Kubernetes minikube tutorial there is this command to use Minikube Docker daemon :

$ eval $(minikube docker-env)

What exactly does this

2条回答
  •  情歌与酒
    2021-02-02 06:09

    Try to run minikube docker-env

    You will see some environment variables are mentioned there :)

    These variables will help your docker CLI (where you write docker commands) to connect with docker daemon in the VM created by minikube !


    Now, to connect your Docker CLI to the docker daemon inside the VM you need to run : eval $(minikube docker-env)

    This will temporarily(for that terminal) connect CLI to docker daemon inside the VM :)


    Now, try to do docker ps , you can see all the containers created inside the VM (will be shown only if you have done some work in k8's cluster)

    This is all possible due to those environment variables by docker-env

提交回复
热议问题