Tuesday, August 13, 2024

How to create a Kubernetes cluster through kind in a local virtual machine

 How to create a Kubernetes cluster through kind in a local virtual machine

what is kind?

kind or kubernetes in docker is a suite of tooling for local Kubernetes “clusters” where each “node” is a Docker container. kind is targeted at testing Kubernetes. 

Kind consist of:

 * Go packages implementing cluster creation, image build, etc.

 * A command line interface (kind) built on these packages.

 * Docker image(s) written to run systemd, Kubernetes, etc.

 * kubetest integration also built on these packages (WIP)


Install the GoLang

#yum intall  go 1.16+ && docker

Install the kind through GoLang

[root@thiru ~]# go install sigs.k8s.io/kind@v0.23.0

go: downloading sigs.k8s.io/kind v0.23.0

go: downloading github.com/spf13/pflag v1.0.5

go: downloading github.com/spf13/cobra v1.4.0

go: downloading github.com/pkg/errors v0.9.1

go: downloading github.com/alessio/shellescape v1.4.1

go: downloading github.com/mattn/go-isatty v0.0.14

go: downloading golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c

go: downloading github.com/pelletier/go-toml v1.9.4

go: downloading github.com/BurntSushi/toml v1.0.0

go: downloading github.com/evanphx/json-patch/v5 v5.6.0

go: downloading gopkg.in/yaml.v3 v3.0.1

go: downloading sigs.k8s.io/yaml v1.3.0

go: downloading github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2

go: downloading gopkg.in/yaml.v2 v2.4.0

Copy the kind excutable file into /usr/local/bin

[root@thiru bin]# cp -pv kind /usr/local/bin/

‘kind’ -> ‘/usr/local/bin/kind’

Kind is ready to use now.

Create a kubernetes cluster through kind.

[root@thiru bin]# kind create cluster

Creating cluster "kind" ...

⢄⡱ Ensuring node image (kindest/node:v1.30.0) 🖼


Kind architecture:





No comments:

Post a Comment