Member-only story
How to load the local docker image in kind kubernetes cluster
Running Kubernetes clusters locally is a widespread practice for development and testing. Kind is a popular tool that enables you to run Kubernetes clusters locally.
One common challenge is loading a local Docker image into a Kind cluster: https://github.com/kubernetes-sigs/kind/issues/3369 as `kind load docker-image` doesn’t work as expect for local build image.
This comprehensive guide will expertly walk you through the steps to accomplish this with alternative approach of using kind load image-archive
.
Prerequisites
Before we begin, ensure you have the following installed on your machine:
Step 1: Create a Kind Cluster
To create a Kind cluster, you can use the following command:
kind create cluster --name my-cluster
This command creates a new Kind cluster named my-cluster
. You can name the cluster anything you like or skip the --name
tag to create cluster
Step 2: Build Your Docker Image
Next, build your Docker image. For this example, I am using a simple Golang service. You can skip this step if you already have a local Dockerfile.
git clone https://github.com/akoserwal/goechoapp