Kind Cluster

This only cover the basics to use a kind cluster. You can find more details atkind documentation.

Installation

You can follow this toinstall kind.

Create a Cluster

You can simply create a kind cluster by

  1. kind create cluster

To customize your cluster, you can provide additional configuration.For example, the following is a sample kind configuration.

  1. kind: Cluster
  2. apiVersion: kind.sigs.k8s.io/v1alpha3
  3. nodes:
  4. - role: control-plane
  5. - role: worker
  6. - role: worker
  7. - role: worker

Using the configuration above, run the following command will give you a k8s1.14.2 cluster with 1 master and 3 workers.

  1. kind create cluster --config hack/kind-config.yaml --image=kindest/node:v1.14.2

You can use —image flag to specify the cluster version you want, e.g.—image=kindest/node:v1.13.6, the supported version are listedhere

Cheetsheet

  1. kind load docker-image your-image-name:your-tag
  • Point kubectl to the kind cluster
  1. export KUBECONFIG="$(kind get kubeconfig-path --name="kind")"
  • Delete a kind cluster
  1. kind delete cluster