Minikube is a one-node Kubernetes cluster where master processes and work processes both run on one node. According to the official documentation of Minikube, 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(Windows)?
Follow these steps to download Minikube via CLI, you can also check out Minikube's official website to download the .exe version.
Step 1. Enter the following command in your Windows PowerShell. Make sure to use PowerShell as an administrator.
New-Item -Path 'c:\' -Name 'minikube' -ItemType Directory -Force
Invoke-WebRequest -OutFile 'c:\minikube\minikube.exe' -Uri 'https://github.com/kubernetes/minikube/
releases/latest/download/minikube-windows-amd64.exe' -UseBasicParsing
Step 2. Now enter the following command to add the minikube.exe binary to your PATH:
$oldPath = [Environment]::GetEnvironmentVariable('Path', [EnvironmentVariableTarget]::Machine)
if ($oldPath.Split(';') -inotcontains 'C:\minikube'){
[Environment]::SetEnvironmentVariable('Path', $('{0};C:\minikube' -f $oldPath), [EnvironmentVariableTarget]::Machine)
}
Step 3. Restart your terminal and enter 'minikube' command to check if Minikube is installed.
minikube
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.

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.

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:

or you can also check the status by running the following command:
minikube status
you will get a similar output on the terminal:

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:

Step 6. Now to run the service, enter the following minikube command:
minikube service geeksforgeeks
It will display the following result:

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:

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

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
Conclusion
In this article we learned about Minikube and how to use it. It is a one node Kubernetes cluster where master processes and work processes both run on a single node. Minikube is a very useful to to deploy and test Kubernetes applications locally. We learned about how to install Minikube along with Kubectl in our local machine and we created a service and deployed it using Minikube. Deploying application through Minikube is very straight forward using minikube and kubectl commands. Later we discussed some common useful Minikube commands. We hope that this article taught you about what Minikube is, how it works and how to deploy an application using Minikube. Make sure to follow other articles on GeeksforGeeks to know about more tools in DevOps.
Similar Reads
Kubernetes - Node
Kubernetes Nodes are the Worker or master machines where the actual work happens. Each Kubernetes node has the services required to execute Pods and is controlled by the Control Plane. Each Kubernetes Node can have multiple pods and pods have containers running inside them. 3 processes in every Node
13 min read
Kubernetes Policies
Pre-requisite: Kubernetes In this article, we will be discussing Kubernetes policies, a key feature in the Kubernetes platform that allows administrators to enforce rules and restrictions on the use and management of resources within a cluster. We will cover the basics of Kubernetes policies, includ
4 min read
Kubernetes - Monitoring
Kubernetes is an open-source container orchestration system that allows developers to deploy and manage containerized applications at scale. One important aspect of running applications in Kubernetes is monitoring their performance and availability. In this article, we will explore some of the best
11 min read
Kubernetes - Volumes
Kubernetes is an open-source container orchestration tool developed by Google. It is primarily employed to automate the deployment, scaling, and management of software. In short, Kubernetes is termed as K8s. Kubernetes is currently maintained by the Cloud Native Computing Foundation. Although it now
9 min read
Kubernetes - Services
Software deployment, scaling, and management are all automated using Kubernetes, an open-source container orchestration system. K8s is another name for Kubernetes. Kubernetes was initially developed by Google and is now managed by the Cloud Native Computing Foundation. Despite the fact that it now s
3 min read
Kubernetes - Secrets
Kubernetes is an open-source container orchestration system mainly used for automated software deployment, management, and scaling. Kubernetes is also known as K8s. Kubernetes was originally developed by Google but it is now being maintained by Cloud Native Computing Foundation. It was originally de
14 min read
Kubernetes Prometheus
With modern DevOps becoming more and more complex, monitoring and alerting stakeholders has become even more crucial for any microservice, and Prometheus is a tool to do the same. Prometheus is a completely open-sourced tool created to monitor highly dynamic container environments like Kubernetes, D
13 min read
Kubernetes - Namespaces
Kubernetes Namespace is a mechanism that enables you to organize resources. It is like a virtual cluster inside the cluster. A namespace isolates the resources from the resources of other namespaces. For example, You need to have different names for deployments/services in a namespace but you can ha
9 min read
Kubernetes Tutorial
Kubernetes is an open-source container management platform that automates the deployment, management, and scaling of container-based applications in different kinds of environments like physical, virtual, and cloud-native computing foundations. In this Kubernetes Tutorial, you are going to learn all
8 min read
Kubernetes - Service DNS
An open-source container orchestration system called Kubernetes is primarily employed for the automated deployment, scaling, and management of software. Another name for Kubernetes is K8s. Initially created by Google, Kubernetes is currently maintained by the Cloud Native Computing Foundation. Altho
11 min read