In this article we are going to cover How to Install minikube on Ubuntu 22.04 LTS | kubernetes with minikube on ubuntu, Install kubectl on Ubuntu 20.04 LTS

What is MiniKube?

Minikube is a tool that enables you to run a single-node Kubernetes cluster on your local machine. Kubernetes is a powerful container orchestration platform used for managing containerized applications in production environments. While Kubernetes is typically used for large-scale deployments, Minikube is designed for local development and testing purposes.

Features and use cases for Minikube:

  1. Local Kubernetes Cluster: Minikube allows you to set up and run a minimal, self-contained Kubernetes cluster on your development machine. This cluster includes the core components of Kubernetes, such as the API server, scheduler, controller manager, and etcd database.
  2. Development and Testing: Minikube is primarily used by developers and testers to develop, test, and debug Kubernetes applications locally before deploying them to a production Kubernetes cluster. This makes it easier to iterate and develop containerized applications without the need for a full-scale Kubernetes cluster.
  3. Isolated Environments: Minikube provides an isolated environment, so you can experiment with Kubernetes features and configurations without affecting your production systems. It’s an excellent tool for learning and getting hands-on experience with Kubernetes.
  4. Cross-Platform Support: Minikube is designed to work on various operating systems, including Linux, macOS, and Windows, making it accessible to a broad range of developers.
  5. Driver Support: Minikube supports different virtualization drivers, such as VirtualBox, KVM, HyperKit (macOS), and Docker, allowing you to choose the virtualization solution that best fits your environment.
  6. Easy Setup: Minikube simplifies the setup and management of a local Kubernetes cluster. You can start a cluster with a single command, and Minikube takes care of the details like configuring the kubeconfig file, setting up the necessary components, and providing access to the cluster.
  7. Add-Ons and Extensions: Minikube supports add-ons and extensions that provide additional functionality, such as dashboard access, metrics, and more, to enhance your local Kubernetes environment.

Overall, Minikube is a valuable tool for developers and DevOps professionals who want to work with Kubernetes in a local, controlled environment. It helps streamline the development and testing process, making it easier to build and deploy containerized applications on Kubernetes.

Install Minikube on Ubuntu 22.04 LTS

Minikube Installations System Requirements:

  • Minimum 2 CPU’s or more    
  • Minimum 2GB of free memory    
  • Minimum 20GB of free disk space   
  •  Internet connection    
  • Container or virtual machine manager, such as: Docker, Hyperkit, Hyper-V, KVM, Parallels, Podman, VirtualBox, or VMware Fusion/Workstation

    For more info visit minikube official website

let’s walk through the process of installing Minikube on Ubuntu using Docker as the driver.

Update System Packages

ubuntu@RushiInfoTech:~$ sudo apt-get update

Step #1:Install Docker on Ubuntu 22.04 LTS

First, install Docker if it’s not already installed:

using below command install docker on ubuntu Ubuntu 22.04 LTS

ubuntu@RushiInfoTech:~$ sudo apt install -y

Once docker installed use the below command to check docker version

ubuntu@RushiInfoTech:~$ docker --version


Ensure Docker is running:

use the below command to start and enable docker service using systemctl

ubuntu@RushiInfoTech:~$ sudo systemctl start docker
ubuntu@RushiInfoTech:~$ sudo systemctl enable docker

To check docker service status use below command

ubuntu@RushiInfoTech:~$ sudo systemctl status docker


ubuntu@RushiInfoTech:~$ docker --version
Docker version 24.0.5, build 24.0.5-0ubuntu1~22.04.1
ubuntu@RushiInfoTech:~$ sudo systemctl start docker
ubuntu@RushiInfoTech:~$ sudo systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2023-09-22 08:49:16 UTC; 5min ago
TriggeredBy: ● docker.socket
Main PID: 1934 (dockerd)
Tasks: 9
Memory: 27.3M
CPU: 333ms
CGroup: /system.slice/docker.service
└─1934 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

Add the current user to the Docker group to run Docker commands without sudo. This step will also avoid certain permission issues when running Minikube:

ubuntu@RushiInfoTech:~$ sudo usermod -aG docker $USER
ubuntu@RushiInfoTech:~$ sudo newgrp docker

Step #2:Install Kubectl on Ubuntu 22.04 LTS

First, you need to download the Kubectl binary from the official Kubernetes release repository. To do this, run the following command in your terminal:

ubuntu@RushiInfoTech:~$ sudo  curl -LO "$(curl -L -s"
ubuntu@RushiInfoTech:~$ sudo chmod +x kubectl
ubuntu@RushiInfoTech:~$ sudo mv kubectl /usr/local/bin/

Step #3:Install Minikube on Ubuntu 22.04 LTS

Fetch the latest Minikube binary and install it:

ubuntu@RushiInfoTech:~$ wget
ubuntu@RushiInfoTech:~$ chmod +x minikube-linux-amd64
ubuntu@RushiInfoTech:~$ sudo mv minikube-linux-amd64 /usr/local/bin/minikube

This will download the latest stable Kubectl binary from the repository. If you would like to download a specific version instead, you can specify the version in the download URL.

Step #4:Start Minikube with the Docker Driver

You can now start Minikube using Docker as the driver:

The Below command execution will take few minutes and This will initiate Minikube to start a single-node Kubernetes cluster inside a Docker container.

ubuntu@RushiInfoTech:~$ minikube start --driver=docker

Output as Expected below:

ubuntu@RushiInfoTech:~$ minikube start --driver=docker
* minikube v1.31.2 on Ubuntu 22.04 (xen/amd64)
* Using the docker driver based on user configuration
* Using Docker driver with root privileges
* Starting control plane node minikube in cluster minikube
* Pulling base image ...
* Downloading Kubernetes v1.27.4 preload ...
    > preloaded-images-k8s-v18-v1...:  393.21 MiB / 393.21 MiB  100.00% 14.60 M
    >  447.62 MiB / 447.62 MiB  100.00% 14.09 M
* Creating docker container (CPUs=2, Memory=2200MB) ...
* Preparing Kubernetes v1.27.4 on Docker 24.0.4 ...
  - Generating certificates and keys ...
  - Booting up control plane ...
  - Configuring RBAC rules ...
* Configuring bridge CNI (Container Networking Interface) ...
  - Using image
* Verifying Kubernetes components...
* Enabled addons: storage-provisioner, default-storageclass
* Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default


To Check the status of Minikube

minikube status


ubuntu@ip-172-31-36-57:~$ minikube status
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured

To check Minikube cluster information

kubectl cluster-info


Kubernetes control plane is running at
CoreDNS is running at

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.

To check minikube cluster statuskubectl get nodes

To view minikube cluster events

kubectl get events

To view the kubectl configuration

kubectl config view


apiVersion: v1
- cluster:
    certificate-authority: /home/ubuntu/.minikube/ca.crt
    - extension:
        last-update: Sun, 19 Feb 2023 09:16:02 UTC
        version: v1.29.0
      name: cluster_info
  name: minikube
- context:
    cluster: minikube
    - extension:
        last-update: Sun, 19 Feb 2023 09:16:02 UTC
        version: v1.29.0
      name: context_info
    namespace: default
    user: minikube
  name: minikube
current-context: minikube
kind: Config
preferences: {}
- name: minikube
    client-certificate: /home/ubuntu/.minikube/profiles/minikube/client.crt
    client-key: /home/ubuntu/.minikube/profiles/minikube/client.key

Lets create first container on Minikube Cluster using kubectl

kubectl run hello-minikube --port=8080

To check pods on minikube using kubectl command

kubectl get pods


kubectl get pods
hello-minikube   1/1     Running   0          37s

We have covered Install Minikube on Ubuntu.

Step #5:Deploy an app on Minikube Cluster

Lets create deployment on Minikube cluster

kubectl create deployment hello-node

To check deployment on minikube cluster

kubectl get deployment


kubectl get deployment
hello-node   1/1     1            1           31s

Expose the deployment using service on minikube cluster

kubectl expose deployment hello-node --type=NodePort --port=8080

To check service on minikube cluster using kubectl

kubectl get svc


kubectl get svc
NAME         TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)          AGE
hello-node   NodePort   <none>        8080:32548/TCP   26s
kubernetes   ClusterIP       <none>        443/TCP          11m

Access the app on minikube cluster using cluster IP

curl -v


*   Trying
* Connected to ( port 32548 (#0)
> GET / HTTP/1.1
> Host:
> User-Agent: curl/7.68.0
> Accept: */*
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Server: nginx/1.10.0
< Date: Thu, 25 Nov 2021 14:59:53 GMT
< Content-Type: text/plain
< Transfer-Encoding: chunked
< Connection: keep-alive
real path=/

server_version=nginx: 1.10.0 - lua: 10001

* Connection #0 to host left intact

we can access it within the cluster via $(minikube ip):$NODE_PORT

To check minikube internal IP

minikube ip
curl -v

To access app on browser using node port


To delete service on minikube cluster using kubectl

kubectl delete service hello-node

To delete deployment on minikube cluster using kubectl

kubectl delete deployment hello-node

To stop minikube cluster

minikube stop


* Stopping node "minikube"  ...
* 1 node stopped.

To delete minikube cluster

minikube delete


* Uninstalling Kubernetes v1.22.3 using kubeadm ...
* Deleting "minikube" in none ...
* Removed all traces of the "minikube" cluster.

Related Articles:

How to Setup EKS Cluster using eksctl [6 Steps]

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *