colin-mccarthy / kind

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KinD (Kubernetes in Docker)

Pre Flight

Install XCODE from the App store

Install HomeBrew

Install KinD with Brew

brew install kind

==> Downloading https://ghcr.io/v2/homebrew/core/kind/manifests/0.11.1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/kind/blobs/sha256:116a1749c6aee8ad7282caf3a3d2616d11e6193c839c8797cde045cddd0e1138
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:116a1749c6aee8ad7282caf3a3d2616d11e6193c839c8797cde04
######################################################################## 100.0%
==> Pouring kind--0.11.1.big_sur.bottle.tar.gz
==> Caveats
zsh completions have been installed to:
 /usr/local/share/zsh/site-functions
==> Summary
🍺  /usr/local/Cellar/kind/0.11.1: 8 files, 8.4MB

kind version

kind v0.11.1 go1.16.4 darwin/amd64

Create Cluster Command

kind create cluster

Creating cluster "kind" ...
 βœ“ Ensuring node image (kindest/node:v1.21.1) πŸ–Ό 
 βœ“ 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

Thanks for using kind! 😊

kubectl cluster-info --context kind-kind
 
Kubernetes master is running at https://127.0.0.1:56926
CoreDNS is running at https://127.0.0.1:56926/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.

k get nodes

NAME                 STATUS   ROLES                  AGE   VERSION
kind-control-plane   Ready    control-plane,master   49s   v1.21.1

Create Cluster from YAML

To use a yaml, place the contents in a file <config.yaml> and then run from the same directory.

kind create cluster --config=config.yaml

M1 Mac Support

https://hub.docker.com/r/rossgeorgiev/kind-node-arm64

Official kind node images target only x86 systems. Although kind can be used to generate ARM64 images, it can do so only after building Kubernetes from sources and this is not very practical when using Raspberry Pi for example.

Here's an example of how to start a single node Kubernetes cluster with kind:

kind create cluster --image rossgeorgiev/kind-node-arm64:v1.20.0

context command

kubectl cluster-info --context kind-kind

delete cluster

kind get clusters

kind delete cluster

About