This repository contains a script to set up a simple Kubernetes cluster via Kubeadm for learning purposes. It deploys Kubernetes version 1.29 using Cilium as CNI without Kubeproxy with encryption enabled. It will create Ubuntu 22.04 LTS VMs on your machine using Multipass.
This allows you to deploy either a single master or a multi-master deployment.
Make sure you have multipass and kubectl installed on your machine.
Additionally, if you plan to manage Cilium from your machine, ensure you have the CLI installed; or use it from any of the master nodes.
The following starts a cluster with 3 masters behind a proxy and 3 workers with 2 CPUs and 16GB of RAM per instance:
./start.sh --workers 3 --cpus 2 --memory 16
To learn about all the options and its default values, run the following command:
./start.sh -h
The cluster is initialized using cloud-init, and all the detailes live inside the kubernetes.yaml file.
Import the kubeconfig
configuration on your machine:
export KUBECONFIG=$(pwd)/k8s_kube_config.conf
kubectl get nodes
Execute the following command to delete the VMs and purge the state of multipass
:
./cleanup.sh