Deckhouse Platform in kind

Install kind, if it is not already installed.

This guide provides a minimal kind cluster configuration required for a Deckhouse installation. The configuration includes installing a single-node Kubernetes cluster and exporting two ports required for a cluster Ingress controller. You can use your cluster configuration in kind, increase the number of nodes or configure a local container registry.

Create a cluster configuration file for kind:

cat <<EOF > kind.cfg
apiVersion: kind.x-k8s.io/v1alpha4
kind: Cluster
nodes:
- role: control-plane
  extraPortMappings:
  - containerPort: 80
    hostPort: 80
    listenAddress: "127.0.0.1"
    protocol: TCP
  - containerPort: 443
    hostPort: 443
    listenAddress: "127.0.0.1"
    protocol: TCP
EOF
cat <<EOF > kind.cfg apiVersion: kind.x-k8s.io/v1alpha4 kind: Cluster nodes: - role: control-plane extraPortMappings: - containerPort: 80 hostPort: 80 listenAddress: "127.0.0.1" protocol: TCP - containerPort: 443 hostPort: 443 listenAddress: "127.0.0.1" protocol: TCP EOF

Before creating a cluster, make sure that ports 80 and 443 are not used.

Create cluster with kind:

kind create cluster --image "kindest/node:v1.21.12@sha256:6f19412d7d7c4156b3302d4de16168227173f155271be69250893e5c8585cb86" --config kind.cfg
kind create cluster --image "kindest/node:v1.21.12@sha256:6f19412d7d7c4156b3302d4de16168227173f155271be69250893e5c8585cb86" --config kind.cfg

Example of creation command output:

$ kind create cluster --image "kindest/node:v1.21.12@sha256:6f19412d7d7c4156b3302d4de16168227173f155271be69250893e5c8585cb86" --config kind.cfg
Creating cluster "kind" ...
 ✓ Ensuring node image (kindest/node:v1.21.12) 🖼
 ✓ Preparing nodes 📦  
 ✓ Writing configuration 📜 
 ✓ Starting control-plane 🕹️ 
 ✓ Installing CNI 🔌 
 ✓ Installing StorageClass 💾 
Set kubectl context to "kind-kind"
You can now use your cluster with:

kubectl cluster-info --context kind-kind

Have a nice day! 👋