kubernetes KinD minikube - ghdrako/doc_snipets GitHub Wiki

Manuall instaling

KinD Kubernetes in Docker

kind runs a local Kubernetes cluster by using Docker containers as “nodes”. kind uses the node-image to run Kubernetes artifacts, such as kubeadm or kubelet. The node-image in turn is built off the base-image, which installs all the dependencies needed for Docker and Kubernetes to run in a container.

Prerequisites

  • Docker (Desktop)
  • Go
  • Kubectl (installed through Docker Desktop)

install chocolatey

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install docker-desktop -y
choco install golang -y
shutdown -r 
choco install kind -y

Save resource

wsl --terminate <distro>
wsl --list --verbose
docker system prune
``





kind create cluster kind create cluster --name kind-2

List clusters

kind get clusters

Change context

kubectl cluster-info --context kind-kind kubectl cluster-info --context kind-kind-2

Deleting a Cluster 

kind delete cluster --name


docker build -t my-custom-image:unique-tag ./my-image-dir kind load docker-image my-custom-image:unique-tag kubectl apply -f my-manifest-using-my-image:unique-tag



#### Configuring Your kind Cluster 

kind create cluster --config kind-example-config.yaml

Multi-node cluster:

three node (two workers) cluster config

kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes:

  • role: control-plane
  • role: worker
  • role: worker

### Minikube
*  https://github.com/kubernetes/minikube
*  https://minikube.sigs.k8s.io/docs/start/

$ minikube start

⚠️ **GitHub.com Fallback** ⚠️