Use a locally built Docker image in kind

Posted on Sep 24, 2022
Note: This article was written a while ago and may contain outdated information. Please verify the details before relying on it. If I express opinions or recommendations, they might not reflect my current views. For this reason, I recommend checking for more recent articles on the same topic.

If you create a local cluster with kind and try to use a locally built Docker image in one of your Pods, you’ll probably face the issue that this image cannot be found!

Well, the problem is that kind on one side looks after the image at the official Docker repositories and on the other side doesn’t serve a local registry out of the box, like minikube for example does.

You can create a local registry when you create your cluster, but this may not work on Windows or without any problems.

But there is also another way. This is by far not the fastest, but for small development and experimenting way easier than trying to setting up the registry.

You can load your docker image into the cluster.

The command for this is kind load docker-image like in this example:

kind load docker-image configmap-demo-v1 -n spring

configmap-demo-v1 is the name of your locally build docker image.

-n spring is the parameter for the cluster name.

Checkout the documentation for more information.

Want to know more?

Keep on reading and choose one of the related articles. You can also check the home page for my latest thoughts, notes and articles.