Skip to content

Create a Kubernetes cluster with multipass for testing purposes

Notifications You must be signed in to change notification settings

agalue/k8s-multipass

Repository files navigation

Kubernetes Cluster with Multipass

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.

Requirements

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.

Start the cluster

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.

Interact with the cluster

Import the kubeconfig configuration on your machine:

export KUBECONFIG=$(pwd)/k8s_kube_config.conf
kubectl get nodes

Clean up

Execute the following command to delete the VMs and purge the state of multipass:

./cleanup.sh

About

Create a Kubernetes cluster with multipass for testing purposes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages