+91 88606 33966            edu_sales@siriam.in                   Job Opening : On-site Functional Trainer/Instructor | Supply Chain Management (SCM)
How to Install Minikube on Ubuntu 22.04

Minikube is a lightweight Kubernetes cluster that creates a single-node cluster in a virtual machine (VM) on your local machine. It quickly creates a local Kubernetes cluster on macOS, Linux, and Windows.

Prerequisites

  • Pre-install Ubuntu 22.04 system
  • 2GB RAM or more
  • 2CPU or more
  • 20GB free disk space
  • sudo privileges

1. Before installing the minikube it is recommended to install all available updates on your system.

sudo apt update
sudo apt upgrade -y

2. Minikube requires either docker or Virtualbox, in this article we will be installing docker on Ubuntu. You can also refer to the official website for installing docker or you can follow the below post.

# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update




3. Install the Docker packages

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

4. Verify that the Docker engine installation is successful by running the hello-world image.

sudo docker run hello-world

This command downloads a test image and runs it in a container. When the container runs it prints a confirmatio message and exits.

5. Now we will add your local user to docker group so that your local user can run docker commands without executing sudo command for root privileges.

sudo usermod -aG docker $USER
newgrp docker

6. Reboot your system .

reboot

7. Check whether docker is in running state or not.

systemctl status docker

8. Download and install the minikube binary

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-latest-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
Screenshot-2024-07-06-104718
installed the minikube binary

9. Verify the minikube version

minikube version

Install Kubectl tool

Kubectl is a command line tool, used to interact with your Kubernetes cluster. So, to install kubectl run beneath curl 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

Next, set the executable permission on it and move to /usr/local/bin

$ chmod +x kubectl
$ sudo mv kubectl /usr/local/bin/

Verify the kubectl version, run

$  kubectl version -o yaml

Start Minikube Cluster

Now that Minikube is installed, start a Kubernetes cluster using the following command:

$ minikube start --driver=docker

You have now initialized a single-node cluster, and it might take a few minutes to download the necessary components.

Similar Topics

Managing CPU and Memory Resources in Kubernetes

PODMAN: THE FUTURE OF CONTAINERIZATION

External vs. Internal Access: NodePort vs. ClusterIP Services in Kubernetes

How to Install Minikube on Ubuntu 22.04

Leave a Reply

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

Scroll to top