Minikube’s built-in Docker registry is actually just a special configuration of your Minikube VM’s Docker daemon, not a separate service.

Let’s get an image into that registry.

First, make sure Minikube is running with the Docker environment loaded. You’d have done this with eval $(minikube docker-env). If you haven’t, your docker build commands will build images on your host machine, not inside Minikube.

Now, let’s build a tiny Nginx image. We’ll tag it specifically for Minikube’s registry. The default address for Minikube’s registry is localhost:5000. So, we’ll tag our image as localhost:5000/my-nginx:latest.

docker build -t localhost:5000/my-nginx:latest .

After this command, if you run docker images, you’ll see localhost:5000/my-nginx in the list. This tells you Docker thinks it knows how to push to localhost:5000.

Now, let’s push it.

docker push localhost:5000/my-nginx:latest

You should see output indicating layers are being pushed. If you get an error here, it’s usually because the Docker daemon inside Minikube isn’t configured to accept pushes to that address, or your host Docker daemon isn’t correctly pointing to the Minikube daemon.

Here’s how to check and fix common issues:

  • Minikube Daemon Not Running or Incorrectly Configured:

    • Diagnosis: Run docker ps on your host machine. If it shows no containers or errors, your host Docker isn’t talking to Minikube. Then, run minikube ssh and inside the VM, run docker ps. If that works, the issue is host-side.
    • Fix: Always ensure you’ve run eval $(minikube docker-env) in your current shell session before any docker build or docker push commands. If you’re unsure, re-run it. This command sets DOCKER_HOST, DOCKER_TLS_VERIFY, and DOCKER_CERT_PATH environment variables to point your host Docker client to the Minikube VM’s daemon.
    • Why it works: The eval $(minikube docker-env) command configures your host’s Docker client to communicate with the Docker daemon running inside the Minikube virtual machine. Without it, your host’s Docker client tries to talk to your host’s native Docker daemon.
  • Registry Not Accessible or Not Running (Rare for Minikube’s Built-in):

    • Diagnosis: Run minikube ssh and inside the VM, run curl -v localhost:5000. You should get an HTTP/1.1 200 OK or similar, not a connection refused.
    • Fix: Minikube’s built-in registry is enabled by default when you use eval $(minikube docker-env). If it’s truly not there, you might have an older Minikube version or a corrupted setup. Try minikube delete and minikube start. For newer versions, you might need to explicitly enable it with minikube start --driver=docker --insecure-registry="localhost:5000".
    • Why it works: The --insecure-registry flag tells the Docker daemon to allow connections to the specified registry address without TLS verification, which is how Minikube’s internal registry is exposed.
  • Firewall Issues:

    • Diagnosis: On your host, try telnet localhost 5000. If it hangs or says "Connection refused," a firewall might be blocking it.
    • Fix: Temporarily disable your host’s firewall (e.g., sudo ufw disable on Ubuntu, or check your macOS/Windows firewall settings) and try again. Re-enable it afterward.
    • Why it works: Firewalls can prevent the Docker client on your host from establishing a network connection to the registry port (5000) exposed by the Minikube VM.
  • Incorrect Image Tagging:

    • Diagnosis: Double-check your docker build command. Ensure the tag exactly matches localhost:5000/<your-image-name>:<tag>.
    • Fix: Rebuild the image with the correct tag: docker build -t localhost:5000/my-nginx:latest .
    • Why it works: The Docker client uses the registry address in the tag to know where to send the push command. If the address is wrong, it tries to push to the wrong place or fails because it doesn’t know where to go.
  • Docker Daemon Inside Minikube Not Restarted After Config Change:

    • Diagnosis: If you manually edited daemon.json inside the Minikube VM (e.g., via minikube ssh), the daemon might need a restart.
    • Fix: Inside the Minikube VM (via minikube ssh), run sudo systemctl restart docker.
    • Why it works: Applying configuration changes to a running service usually requires restarting that service to pick up the new settings.

Once the image is pushed, you can use it in your Kubernetes manifests by referencing localhost:5000/my-nginx:latest.

After successfully pushing your image, the next hurdle is often convincing Kubernetes itself to pull that image from your local registry.

Want structured learning?

Take the full Minikube course →