Local Image Development Workflow with Minikube
Intermediatev1.0.0
Build and test container images locally with Minikube without pushing to a remote registry — using image loading, Docker environment sharing, and build caching.
Content
Overview
Minikube provides multiple ways to use locally built container images without pushing to a remote registry. This dramatically speeds up the inner development loop — build an image, load it into minikube, and deploy in seconds.
Why This Matters
- -Fast iteration — skip registry push/pull for every change
- -Offline development — no internet required after initial image pulls
- -Cost savings — no registry bandwidth or storage costs for dev images
- -Simpler setup — no registry authentication to configure
How It Works
Method 1: minikube image load (Recommended)
Method 2: minikube docker-env (Share Docker Daemon)
Method 3: minikube image build (Build Directly)
Deployment YAML with imagePullPolicy
Best Practices
- -Use
imagePullPolicy: Neverfor local-only images - -Use
minikube image loadfor the simplest workflow - -Use
minikube docker-envwhen you need build caching - -Tag local images with a dev tag to distinguish from registry images
- -Use
minikube image rmto clean up old local images
Common Mistakes
- -Forgetting to set
imagePullPolicy: Never(Kubernetes tries to pull from registry) - -Using :latest tag without imagePullPolicy set (always pulls from registry)
- -Building with host Docker but expecting minikube to find the image
- -Not resetting docker-env when switching back to host Docker
FAQ
Discussion
Loading comments...