Introduction
Minikube is a lightweight tool that lets you run a single-node Kubernetes cluster locally. It’s perfect for developers and DevOps engineers looking to experiment, test deployments, or simply get comfortable with Kubernetes without paying for cloud resources.

Prerequisites
Before we dive in, make sure we have:
✅ Ubuntu 20.04 or newer
✅ A system with at least 2 CPUs, 2GB RAM, and 20GB free space
✅ Internet connection
✅ Terminal access with sudo privileges
We need to install:
- docker
- kubectl
- minikube
Install Docker
We need to install docker before installing minikube on local.We can refer below link to download docker on local on ubuntu.
- Verify if docker is installed on local or not.

2. If docker is not installed , we can install docker from below guide.
Install kubectl
Kubectl needs to installed before installing minikube on local.With the help of below commands we can install kubectl on local.If its already installed we can skip this step.
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"<br>sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl<br>kubectl version --client

Install Minikube
To install minikub on local to setup local kubernetes environment , we need to run below commands.
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
minikube version
After installing , do verify it.

Start Minikube
After installation of minikube , we need to start minikube service
minikube start --driver=docker

After starting minikube , do check the status , it should be in Running state.

Verify by running kubectl commands
kubectl get pods

Deploy Your First App
Once we have setup minikube on local environment , we can deploy our first sample app.In this guide we are going to deploy sample nginx application on minikube localy.
kubectl run nginx --image=nginx --port=80
We can verify deployment of nginx pod by running below command , it should be Ready.
kubectl get pods

To access nginx service , we can port-forward it , in this guide we are testing it on AWS Ec2 instance , so we can test it by port-forwarding over the internet with –address 0.0.0.0, if you are testing on local , then no need of mentioning –address 0.0.0.0
kubectl port-forward pod/nginx 8081:80 --address 0.0.0.0

We can access nginx by EC2 public ip and port.Note: 8081 should be opened in security group.We can see that we can access nginx service sucessfully running on minikube setup localy on ubuntu server.

Stop or Delete Cluster
To stop the server , use below command:
minikube stop

To delete and cleanup minikube on local
minikube delete

Conclusion
In this guide, we explored how to set up Minikube locally on Ubuntu to run Kubernetes clusters for development and testing. Minikube is a powerful tool for developers and DevOps engineers to experiment, debug, and deploy applications in a Kubernetes environment without needing access to a cloud platform. It’s especially beneficial for learning, testing manifests, and validating configurations before deploying to production.
Whether you’re just starting out or building complex pipelines, Minikube gives you the flexibility and control to work with Kubernetes right from your local machine.