Edge Conductor / Tutorials / Deploy a KIND cluster
KIND is a tool for testing kubernetes, it runs a local kubernetes cluster using Docker itself.
Follow these steps below to deploy a Kubernetes in Docker (KIND) deployment with Edge Conductor tool.
- Prerequisites
- Configure KIND deployment
- Initialize Edge Conductor
- Build and Deploy KIND Cluster
- Check the KIND Cluster
- What's Next
First, make sure your host meets the following requirements to run this tutorial:
-
Hardware requirements for the Edge Conductor Day-0 Host. This tutorial will deploy a 2-node KIND cluster (1 control plane and 1 worker). For each KIND node, you need to add 2 CPU cores and 2 gigabytes (GB) memory.
-
Follow Build and Install the Tool to build and install Edge Conductor tool.
-
Enter the
_workspace
folder to run the Edge Conductor tool.
An example of Edge Conductor kit for KIND is under:
kit/
└── kind.yml
We will use this Edge Conductor kit to deploy the KIND cluster in this document.
Open the Edge Conductor kit config file (kit/kind.yml) and modify the password of the local registry. Edge Conductor tool will launch a local registry as the storage of binary files, container images and configuration files. This registry password will be used to create user authentication.
Parameters:
customconfig:
registry:
password: "<passWord_nnnn>"
Note: The password must be surrounded by double quotes (
"
). We recommend that it contains at least 8 characters with 1 lowercase letter, 1 uppercase letter and 1 numeric character.
Check more details of the Edge Conductor kit configuration here.
Run the following commands to initialize the Edge Conductor environment:
./conductor init -c kit/kind.yml
You will see output similar to:
INFO[0000] Init Edge Conductor
INFO[0000] ==
INFO[0000] Current workflow: init
...
INFO[0005] workflow finished
INFO[0005] ==
INFO[0005] Done
Run the following command to build KIND Cluster:
./conductor cluster build
You will see output similar to:
INFO[0000] Init Edge Conductor
INFO[0000] ==
INFO[0000] Top Config File: kit/kind.yml
...
INFO[0008] workflow finished
INFO[0008] Connecting Plugin docker-run
INFO[0008] ==
INFO[0008] Done
Run the following command to deploy KIND Cluster:
./conductor cluster deploy
You will see output similar to:
INFO[0000] Edge Conductor - Deploy Cluster
INFO[0000] ==
...
Creating cluster "kind" ...
✓ Ensuring node image (kindest/node:v1.21.1) 🖼
✓ Preparing nodes 📦 📦 📦 📦
✓ Writing configuration 📜
✓ Starting control-plane 🕹️
✓ Installing CNI 🔌
✓ Installing StorageClass 💾
✓ Joining worker nodes 🚜
Set kubectl context to "kind-kind"
...
INFO[0094] workflow finished
INFO[0094] ==
INFO[0094] Done
The kubeconfig will be copied to the default path ~/.kube/config
.
NOTE: If you export KUBECONFIG, you need to unset the KUBECONFIG or copy
~/.kube/config
to your KUBECONFIG directory.
Run the following commands to check the nodes that are available and the services deployed to the KIND cluster:
kubectl get pods,svc,nodes -A
You will see output similar to:
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system pod/coredns-558bd4d5db-4qjmq 1/1 Running 0 11m
kube-system pod/coredns-558bd4d5db-fckgb 1/1 Running 0 11m
kube-system pod/etcd-kind-control-plane 1/1 Running 0 11m
kube-system pod/kindnet-djzbj 1/1 Running 0 11m
kube-system pod/kindnet-l5x8b 1/1 Running 0 11m
kube-system pod/kube-apiserver-kind-control-plane 1/1 Running 0 11m
kube-system pod/kube-controller-manager-kind-control-plane 1/1 Running 0 11m
kube-system pod/kube-proxy-7vrf8 1/1 Running 0 11m
kube-system pod/kube-proxy-dvgw9 1/1 Running 0 11m
kube-system pod/kube-scheduler-kind-control-plane 1/1 Running 0 11m
local-path-storage pod/local-path-provisioner-547f784dff-28jlh 1/1 Running 0 11m
NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
default service/kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 12m
kube-system service/kube-dns ClusterIP 10.96.0.10 <none> 53/UDP,53/TCP,9153/TCP 12m
NAMESPACE NAME STATUS ROLES AGE VERSION
node/kind-control-plane Ready control-plane,master 12m v1.21.1
node/kind-worker Ready <none> 11m v1.21.1
Be sure the status for all pods is Running
.
Congratulations! You have deployed a KIND cluster with Edge Conductor tool!
Next Tutorial: Example: Hello Cluster!
Back to: Edge Conductor Basics
Copyright (C) 2022 Intel Corporation
SPDX-License-Identifier: Apache-2.0