Kind is short for Kubernetes in Docker.
As the name suggests, you need to have a working installation of Docker before you can use KinD.
You can refer to instructions at the top of this article on the best option to install Docker on your machine.
Once Docker is installed, you should install kubectl next.
Kubectl is a command-line interface that assists in handling Kubernetes clusters.
In most cases, it should easily be installed through Chocolatey with:
The steps to install Chocolatey are described here.
Install on Windows using Chocolatey or Scoop
choco install
kubernetes-cli
If installed already kubernetes-cli
PS C:\Users\Administrator> choco install kubernetes-cli -y
Chocolatey v0.11.1
Installing the following packages:
kubernetes-cli
By installing, you accept licenses for the packages.
kubernetes-cli v1.22.2 already installed.
Use --force to reinstall, specify a version to install, or try upgrade.
Chocolatey installed 0/1 packages.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Warnings:
- kubernetes-cli - kubernetes-cli v1.22.2 already installed.
Use --force to reinstall, specify a version to install, or try upgrade.
Did you know the proceeds of Pro (and some proceeds from other
licensed editions) go into bettering the community infrastructure?
Your support ensures an active community, keeps Chocolatey tip-top,
plus it nets you some awesome features!
https://chocolatey.org/compare
Install KIND
Now you will use choco to install Kind using cli PS1: choco install kind -y
PS C:\Users\Administrator> choco install kind -y
Chocolatey v0.11.1
Installing the following packages:
kind
By installing, you accept licenses for the packages.
Progress: Downloading kind 0.11.1... 100%
kind v0.11.1 [Approved]
kind package files install completed. Performing other installation steps.
Downloading kind 64 bit
from 'https://github.com/kubernetes-sigs/kind/releases/download/v0.11.1/kind-windows-amd64'
Progress: 100% - Completed download of C:\ProgramData\chocolatey\lib\kind\kind.exe (6.58 MB).
Download of kind.exe (6.58 MB) completed.
Hashes match.
ShimGen has successfully created a shim for kind.exe
The install of kind was successful.
Software install location not explicitly set, it could be in package or
default install location of installer.
Chocolatey installed 1/1 packages.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
PS C:\Users\Administrator>
If you hadn’t installed Docker till now, the above command should install it automatically.
Note: If you have WSL 2 installed, it will automatically be used.
Let’s test it
Using cli : kind create cluster for test
PS C:\Users\Administrator> kind create cluster
Creating cluster "kind" ...
• Ensuring node image (kindest/node:v1.21.1) 🖼 ...
✓ Ensuring node image (kindest/node:v1.21.1) 🖼
• Preparing nodes 📦 ...
✓ Preparing nodes 📦
• Writing configuration 📜 ...
✓ Writing configuration 📜
• Starting control-plane 🕹️ ...
✓ Starting control-plane 🕹️
• Installing CNI 🔌 ...
✓ Installing CNI 🔌
• Installing StorageClass 💾 ...
✓ Installing StorageClass 💾
Set kubectl context to "kind-kind"
You can now use your cluster with:
kubectl cluster-info --context kind-kind
Not sure what to do next? 😅 Check out https://kind.sigs.k8s.io/docs/user/quick-start/
PS C:\Users\Administrator>
The command could take a while (5 minutes+ and if your RAM is 8GB, you’ll see some slowdown as well).
To check if we were successful, type:
PS C:\Users\Administrator> kubectl cluster-info --context kind-kind
Kubernetes control plane is running at https://127.0.0.1:1031
CoreDNS is running at https://127.0.0.1:1031/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
PS C:\Users\Administrator>
Excellent, your cluster is ready!
Good lucky
Phuong Nguyen
Refernce sourc: https://learnk8s.io/installing-docker-kubernetes-windows