←

Kind setup

Local Kubernetes cluster with Kind


Download tools

Docker

kubectl

Kind

Create a Kubernetes cluster with Kind

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: lab-cluster
nodes:
- role: control-plane
- role: worker
- role: worker
kind create cluster --config=config.yaml
Creating cluster "lab-cluster" ...
 ✓ Ensuring node image (kindest/node:v1.37.0) đŸ–ŧī¸
 ✓ Preparing nodes đŸ“Ļ đŸ“Ļ đŸ“Ļ
 ✓ Writing configuration 📜
 ✓ Starting control-plane đŸ•šī¸
 ✓ Installing CNI 🔌
 ✓ Installing StorageClass 💾
 ✓ Joining worker nodes 🚜
Set kubectl context to "kind-lab-cluster"
You can now use your cluster with:

kubectl cluster-info --context kind-lab-cluster

Have a question, bug, or feature request? Let us know! https://kind.sigs.k8s.io/#community 🙂

Check cluster status

kubectl get nodes
NAME                        STATUS   ROLES           AGE     VERSION
lab-cluster-control-plane   Ready    control-plane   3m9s    v1.37.0
lab-cluster-worker          Ready    <none>          2m56s   v1.37.0
lab-cluster-worker2         Ready    <none>          2m57s   v1.37.0

Delete cluster

> kind get clusters
lab-cluster
kind delete cluster --name lab-cluster
Deleting cluster "lab-cluster" ...
Deleted nodes: ["lab-cluster-worker2" "lab-cluster-worker" "lab-cluster-control-plane"]