Creating a k8s cluster
Course: Kubernetes Part 1 - chapter 4
Locally (Make sure you have docker)
Section titled “Locally (Make sure you have docker)”- minukube
- kind - https://kind.sigs.k8s.io/docs/user/quick-start/
On cloud
Section titled “On cloud”- GKE
- AWS K8s
- vultr
Using kind
Section titled “Using kind”- Install kind - https://kind.sigs.k8s.io/docs/user/quick-start/#installation
Single node setup
Section titled “Single node setup”- Create a 1 node cluster
kind create cluster --name local- Check the docker containers you have running
docker ps- You will notice a single container running (control-pane)
- Delete the cluster
kind delete cluster -n localMulti node setup
Section titled “Multi node setup”- Create a
clusters.ymlfile
kind: ClusterapiVersion: kind.x-k8s.io/v1alpha4nodes:- role: control-plane- role: worker- role: worker- Create the node setup
kind create cluster --config clusters.yml --name local- Check docker containers
docker ps
Now you have a node cluster running locally
Using minikube
Section titled “Using minikube”- Install minikube - https://minikube.sigs.k8s.io/docs/start/?arch=%2Fmacos%2Fx86-64%2Fstable%2Fbinary+download
- Start a k8s cluster locally
minikube start- Run
docker psto see the single node setup
💡 A single node setup works but is not ideal. You don’t want your control pane to run containers/act as a worker.