Open In App

Kubernetes Minikube

Last Updated : 11 Sep, 2025
Suggest changes
Share
3 Likes
Like
Report

Minikube is a one-node Kubernetes cluster where master processes and work processes both run on one node. Minikube is local Kubernetes, focusing on making it easy to learn and develop for Kubernetes.

A prerequisite to use Minikube is a Docker container or a Virtual Machine environment. Minikube provides you a way to easily deploy application on Kubernetes for learning and developing purposes even if you don't have enough resources like memory, CPU etc.

How to Install Minikube on Linux

Follow these steps to install Minikube on Linux using the command line. You can also check out Minikube’s official website for alternative installation methods.

Step 1. Download the latest Minikube binary:

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64

Step 2. Install Minikube to your system path:

sudo install minikube-linux-amd64 /usr/local/bin/minikube

Step 3. Verify the installation:

minikube version

This will give you a similar output if Minikube is installed. If you face any other issues, checkout the official website of Minikube for resolving it.

Screenshot-from-2025-09-10-18-24-40


What Does Minikube Do?

Minikube is a one node Kubernetes cluster that runs in VirtualBox on your local machine in order to test Kubernetes on your local set up. In order to setup a production cluster, we need multiple master notes and multiple worker nodes. Master nodes and worker nodes have their own separate responsibilities. In order to test something on our local environment for example - deploying a new application or a new component and to test it on our local machine, it will be very difficult and would consume a lot of resources like CPU, memory etc.

Minikube comes into play here. Minikube is an open-source tool that is basically like a one node cluster where the master processes and the work processes both run on one node. This node must have a Docker container runtime pre-installed to run the containers or pods with containers on this node.

Deploying a Service Using Minikube and Kubectl

Kubectl is the Kubernetes CLI tool. To know more about Kubectl, read the following article on GeeksforGeeks - Kubernetes - Kubectl. Follow these steps to deploy a service using Minikube and Kubectl:

Step 1. Enter the following command to start the Kubernetes cluster:

minikube start

If you are logged in as a root user you might get an error message:

Exiting due to DRV_AS_ROOT: The "docker" driver should not be used with root privileges.

This is because the default driver in the Docker driver and it should not be used with root privileges. For fixing this we should log in as a different user that the root user.

Screenshot-from-2025-09-10-18-32-46




Enter the following command to add a new user

adduser [USERNAME]

Now enter the following command to login as a new user

su - [USERNAME]

Now upon entering the same minikube start command

minikube start

you will get a similar output, wait for some time until the installation of dependencies gets completed:

Step 2. Now if we check the number of nodes running, we will get the minikube node running.

kubectl get nodes

this will give you the following output:

kubectl get nodes

or you can also check the status by running the following command:

minikube status

you will get a similar output on the terminal:

minikube status

Step 2. To find out the services that are currently running on Kubernetes enter the following command:

kubectl get services

you will only see the default Kubernetes service running.

Step 3. Enter the following command on your terminal to create a deployment

kubectl create deployment geeksforgeeks --image=kicbase/echo-server:1.0

Step 4. Enter the following command to expose the deployment to the port 6000:

kubectl expose deployment geeksforgeeks --type=NodePort --port=6000

Step 5. Now when you check out the list of services

kubectl get services

you will find the geeksforgeeks service:

kubectl get services

Step 6. Now to run the service, enter the following minikube command:

minikube service geeksforgeeks

It will display the following result:

minikube service

You have to just copy the address (http://127.0.0.1:42093/ for me) and paste it to your browser to see the application website. It looks like the following:

get call

Some common Minikube command

1. Deleting The Minikube Cluster

You just have to simply enter the following command to delete the minikube cluster.

minikube delete

minikube delete

2. To Pause Kubernetes Without Impacting Deployed Applications.

minikube pause

3. To Unpause The Instance

minikube unpause

4. To Stop The Cluster

minikube stop

5. To Delete All Minikube Clusters

minikube delete --all

Explore