If you want to set up the kubernetes cluster in the local system environment then you may use minikube along with a virtual box. It will create the cluster in local system environment.
Install minikube on ubuntu
First update your system with the below command and install the required packages
sudo apt-get update -y
sudo apt-get install apt-transport-https
Now install the virtual box with the below command
sudo apt install virtualbox virtualbox-ext-pack
Press OK for the accepting the license agreement
Now select yes and press enter
Now wait for few minutes till it get completed.
Execute the below command to install minikube
Now copy and move the fie to /usr/local/bin directory
sudo cp minikube-linux-amd64 /usr/local/bin/minikube
Now provide executable permissions to the file
sudo chmod 777 /usr/local/bin/minikube
Now install kubectl with the below command
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
If you see an error which says curl command not found then install curl first with the below command and then execute the above command again.
sudo apt install curl -y
Now provide executable permissions to kubectl with the below command and move it to /usr/local/bin directory
chmod +x ./kubectl && sudo mv ./kubectl /usr/local/bin/kubectl
Once you are done with these steps execute below command to start minikube, it will first install minikube iso file from an online source and create kubernetes cluster in local system environment.
For accessing the kubernetes dashboard just simply execute