Reputation: 531
I could understand, different ways to access docker image from local machine to Minikube VM.
(Kubernetes + Minikube) can't get docker image from local registry
All these examples are for Mac/Linux user.
I'm looking for an equivalent suggestion for Windows user.
What's windows equivalent to -> eval $(minikube docker-env)
Upvotes: 12
Views: 15466
Reputation: 550
Please open windows powershell as mentioned in above answers, execute minikube docker-env.
--> result of the output , note down last line and execute it to point to docker instance inside k8s. I found below command, which is working for me.
minikube -p minikube docker-env --shell powershell | Invoke-Expression
Upvotes: 0
Reputation: 1
These are the 3 commands basically you have to run -
minikube start minikube docker-env & minikube -p minikube docker-env | Invoke-Expression
Upvotes: 0
Reputation: 51
Little late to the party but you can do this on Windows:
minikube cache add alpine:latest
which gave me message that it is deprecated.
So finally use this:- minikube image load imagename
where imagename is docker daemons image name
Ref: https://minikube.sigs.k8s.io/docs/commands/image/#minikube-image-load
Upvotes: 0
Reputation: 8541
You can use below command in the command prompt,
@FOR /f "tokens=*" %i IN ('minikube -p minikube docker-env') DO @%i
In fact when you run the command minikube docker-env
it will instruct you how to connect,
Upvotes: 4
Reputation: 55
Like manvedra said ,those steps worked for me too. In a powershell command prompt and run the following commands:
minikube start
, to start minikube cluster.
minikube docker-env
, it will configure some environment variables and at bottom it will show the last command to be run.
minikube -p minikube docker-env | Invoke-Expression
, last step.
Done.
Upvotes: 1
Reputation: 1039
Same error and this solution doesn't work for me.
I found this solution here.
You should install docker separate way:
Upvotes: 0
Reputation: 531
I found relatively easy way to point docker client(docker-machine) to minikube’s docker environment by running below commands in PowerShell ->
PS C:\Users\ABC> minikube docker-env
PS C:\Users\ABC> minikube docker-env | Invoke-Expression
Upvotes: 21
Reputation: 2895
What's windows equivalent to -> eval $(minikube docker-env)
either docker-machine env my-default
or
@FOR /f "tokens=*" %i IN ('docker-machine env YOURMACHINENAME') DO @%i
Upvotes: -1