Kind
helps you bring up local k8s cluster for testing and POC. Seamlessly
working with kubectl and others: such as prometheus, operator, helmfile, etc.
Install Kind
The install is easy with go
(1.17+), see this
instruction:
1 | # At the time of writing the kind stable version is 0.18.0, it will place the |
Basic Workflow
Cluster Creation
To spin up local k8s cluster:
1 | # see options and flags |
Cluster Configuration
The advanced configuration please see this section. A simple multi-node cluster, can be used to test for example rolling upgrade:
1 | kind: Cluster |
Load Image
The kind k8s cluster uses containerd
runtime, you can docker exec
into node
container and check with crictl
command:
1 | # list images |
To load image into the kind node, for example:
1 | kind load docker-image busybox [--name dev] [--nodes x,y,z] |
Then in the node container you will see busybox by crictl images
.
Context Switch
To manage clusters:
1 | # View kind clusters |
Cluster Deletion
1 | kind delete cluser --name dev |
Kind Logging
To check kind logs:
1 | kind export logs --name dev [./some_folder] |
Ingress
For how to set up ingress for kind K8s cluster, please check: https://kind.sigs.k8s.io/docs/user/ingress/
Load Balancer
For how to set up LB service type in kind K8s cluster, please check: https://kind.sigs.k8s.io/docs/user/loadbalancer/