Skip to content

Instantly share code, notes, and snippets.

@sheikhnavezz
Last active June 5, 2024 19:04
Show Gist options
  • Save sheikhnavezz/2e3093f158bde2f6b5d75a39f9759e37 to your computer and use it in GitHub Desktop.
Save sheikhnavezz/2e3093f158bde2f6b5d75a39f9759e37 to your computer and use it in GitHub Desktop.
Minikube Installation procedure on Ubuntu OS

Minikube Installation on ubuntu

Update system:

before installing any software, you need to update the system you are working on. here, we use Ubuntu OS and the commands are:

           sudo apt-get update -y 

1. Install docker:

follow the documentation or copy paste below installation steps

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 -y 
sudo apt-get docker.io -y

2. Install minikube:

Now, with docker setup move on installing Minikube on your /ubuntu system. First download the latest Minikube binary using wget command:

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

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

then give the file executive permission using the chmod command:

  sudo chmod 755 /usr/local/bin/minikube

3. finally, verify you have successfully installed minikube by checking the version of the software. command:

    minikube version

4. Install kubectl :

you can install kubectl binary with curl on linux by downloading the latest release with the command :

 curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"

5. then install kubectl with sudo :

  sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

6. after that

   kubectl version

7. now start the minikube without being root command:

  sudo usermod -aG docker $USER && newgrp docker
  minikube start
  minikube status
  minikube stop

(optional)

        minikube start --driver=docker    

to delete the container command:

minikube delete 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment