linux - How to use local docker images with Minikube? - Stack Overflow

PHOTO EMBED

Tue Aug 03 2021 09:53:41 GMT+0000 (UTC)

Saved by @RokoMetek #yaml

# Start minikube
minikube start

# Set docker env
eval $(minikube docker-env)             # unix shells
minikube docker-env | Invoke-Expression # PowerShell

# Build image
docker build -t foo:0.0.1 .

# Run in minikube
kubectl run hello-foo --image=foo:0.0.1 --image-pull-policy=Never

# Check that it's running
kubectl get pods
content_copyCOPY

https://stackoverflow.com/questions/42564058/how-to-use-local-docker-images-with-minikube