Installing Minikube: Your Key to Getting Started With Kubernetes on Linux
Hands-On Learning: Minikube Installation for Kubernetes Beginners on Ubuntu
Starting with Minikube: Your First Step to Kubernetes Learning
Kubernetes is a magical technology for managing large numbers of containers, but learning it might feel like diving into the deep end. Minikube comes in handy in this situation.
Minikube is your loyal partner as you discover Kubernetes. It's similar to a mini-version of Kubernetes that you may run on your computer. It allows you to practice and experiment without fear of breaking anything.
So, why should you use Minikube to learn Kubernetes? Because it's similar to a secure playground. You can experiment and make mistakes without fear of consequences. Minikube allows you to explore Kubernetes without needing a fancy server or cloud service, whether you're an IT professional or just curious about containers.
In this guide, we'll show you how to set up Minikube on your Linux machine. It's the first step to understanding Kubernetes and getting comfortable with it. Let's get started on this journey to make Kubernetes simple and fun!
Prerequisites:
Debian based Linux OS such as Ubuntu.
Permission to execute commands as root (sudo).
Step 1: Docker Installation & Configuration
The first step is to install Docker and allow your Linux user to use docker commands without sudo privileges. To do this, you need to first add your username to the docker group and then reboot your computer. You can skip this step if you already have Docker installed on your machine.
sudo apt-get update
sudo apt-get install docker.io -y
sudo usermod -aG docker <USERNAME>
sudo reboot # Warning, this command will reboot your machine
# this is needed after adding user to docker group
After the computer has been rebooted, run docker version
to confirm that docker has been successfully installed.
Step 2: Install Minikube and Kubectl
After docker is installed, we can move on to installing Minikube and Kubectl. The Kubernetes command-line tool, Kubectl, allows you to run commands against Kubernetes clusters. You can use Kubectl to deploy applications, inspect and manage cluster resources, and view logs.
Install Minikube
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_arm64.deb
sudo dpkg -i minikube_latest_arm64.deb
Install Kubectl
To install Kubectl, you can follow the documentation given here to get the latest version of Kubectl or use the below-given commands to install the latest version as of 3rd September 2023
sudo apt-get install -y apt-transport-https ca-certificates curl
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.28/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.28/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubectl
Step 3: Start Minikube
Now we are ready to create our first Kubernetes cluster using Minikube, run minikube start --driver=docker
to create the cluster. It will take some time to download and configure the cluster and Kubectl. Your screen should look like this after the installation is done.
Run minikube status
to check if Minikube started the cluster successfully. The output should look like this:
Congratulations on Installing Minikube! 🥳💯
You succeeded! You've successfully installed Minikube, your entry point into Kubernetes Adventures. You're now ready to dive into the realm of containers.
Minikube provides a secure environment for learning and experimenting with Kubernetes. Whether you're a developer or simply inquisitive, you can now delve into Kubernetes with confidence.
Your trip has only just begun, and there is so much to learn. Continue to study, experiment, and enjoy the wonderful world of Minikube with Kubernetes! 🔥