2

I'm running the built in Kubernetes cluster of Docker for Windows for development purposes and I need run some Docker commands against the cluster, but I'm unable to find a replacement for Minikube's "minikube docker-env".

I want to do something like this to manipulate the Kubernetes cluster:

eval $(minikube docker-env)

I want to do something like this after I'm done with the Kubernetes cluster:

eval $(docker-machine env -u)
user1937459
  • 857
  • 1
  • 9
  • 17
  • 1
    does `kubectl` not work for you? No reason you shouldn't be able to switch to your DfW kubernetes context. – Josh E Jun 25 '19 at 15:27
  • potentially a dupe of https://stackoverflow.com/questions/44712874/how-do-i-simply-run-a-container-from-the-command-line-in-kubernetes-cluster-lik and/or https://stackoverflow.com/questions/56371369/kubernetes-equivalent-of-docker-run-it – Josh E Jun 25 '19 at 15:30

1 Answers1

5

One of the big advantages of the Kubernetes distribution built into the Docker Desktop products is that there isn’t a separate Kubernetes VM. These commands just don’t exist; the Kubernetes Docker is the same Docker as your desktop Docker.

(Remember to set imagePullPolicy: Never on pod specs where you’re docker building the image the pod runs, and that hacks like bind-mounting your local source tree over what’s built into an image are especially unwieldy and unportable in Kubernetes.)

David Maze
  • 130,717
  • 29
  • 175
  • 215