-
Install oracle virtual box and run ubuntu server 22.04 LTS. Installation guide.
-
Recommended vm system requirements:
- CPU >= 2 cores
- Memory >= 2 GB
- Storage >= 20GB
Permanently disable swap. Updates on swap:
- kubernetes/kubernetes#53533
- https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/2400-node-swap
swapoff -a; sed -i '/swap/d' /etc/fstab
-
Install container runtime (containerd)
- Install [containerd] (https://github.com/containerd/containerd/blob/main/docs/getting-started.md)
- Install runc
- Install cni-plugins
- Generate config.toml file for containerd. [Guide]
- Configure systemd cgroup driver. [Guide]
-
Install kubeadm, kubelet, kubectl. [Guide]
-
Bootstarp cluster. [Guide]
kubeadm init --pod-network-cidr=192.168.0.0/16 --ignore-preflight-errors=all
kubectl taint nodes --all node-role.kubernetes.io/control-plane- node-role.kubernetes.io/master-
- Use cluster
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
Alternatively, if you are the root user, you can run:
export KUBECONFIG=/etc/kubernetes/admin.conf
- Check the pods.
kubectl get pods -A
A big thanks to Emruz Hossain bhai for the k8s provision workflow contents.
-
Kubernetes Networking
-
Container Network Interface
- https://kubernetes.io/docs/concepts/cluster-administration/networking/#how-to-implement-the-kubernetes-networking-model
- https://kubernetes.io/docs/concepts/architecture/cri/
- Introduction to CNI, the Container Network Interface Project - Bryan Boreham & Dan Williams
- Below Kubernetes: Demystifying container runtimes
- Kubernetes Networking: How to Write a CNI Plugin From Scratch - Eran Yanay, Twistlock