Following script install Kubernetes. Multipass is used for virtualization.
Multipass is a lightweight VM manager for Linux, Windows and macOS. It's designed for developers who want a fresh Ubuntu environment with a single command. It uses KVM on Linux, Hyper-V on Windows and HyperKit on macOS to run the VM with minimal overhead. It can also use VirtualBox on Windows and macOS. Multipass will fetch images for you and keep them up to date.
First multpipass need to be installed whuch is required for virtualization to run this script
This script is tested on ubuntu 22.04.1
wget https://raw.githubusercontent.com/Avarch-org/multipass-k8s/main/createCluster.sh && chmod +x createCluster.sh && ./createCluster.sh
multipass list
multipass shell master
kubectl get nodes -o wide
kubectl get pods -A -o wide