Minikube is a powerful tool for running Kubernetes clusters locally. If you’re using Ubuntu 24.04 and want to get started with Minikube, this guide will walk you through the installation process step-by-step. By the end, you’ll have a fully functional Kubernetes environment at your fingertips.
Prerequisites
Before you begin, ensure that you have:
- Ubuntu 24.04 installed.
- A terminal window open with access to the command line.
- Sufficient hardware resources: at least 4GB of RAM and 2 CPUs for Minikube.
Step 1: Install kubectl
The first step is to install kubectl, the command-line tool for interacting with Kubernetes clusters. The easiest way to install it on Ubuntu is through Snap.
Open your terminal and run the following command:
sudo snap install kubectl --classic
This will install kubectl on your system, allowing you to manage your Kubernetes clusters effectively.
Step 2: Download Minikube
Next, you’ll need to download the Minikube binary. You can do this with the wget command. In your terminal, run:
wget https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 -O minikube
This command downloads the latest version of Minikube and saves it as minikube.
Step 3: Make the Binary Executable
Now that you have the binary, you need to make it executable. Run:
chmod 755 minikube
Step 4: Move Binary to /usr/local/bin
To make Minikube accessible from anywhere in the terminal, move it to the /usr/local/bin directory:
sudo mv minikube /usr/local/bin/
Step 5: Verify the Installation
You can verify that Minikube is installed correctly by checking its version. Run the following command:
minikube version
You should see output similar to:
minikube version: v1.34.0
commit: 210b148df93a80eb872ecbeb7e35281b3c582c61
This indicates that Minikube has been successfully installed.
Step 6: Start Minikube
Now, you’re ready to start your Minikube cluster. Use the following command to start it with specified resources:
minikube start --memory=4096 --cpus=2
This command allocates 4GB of memory and 2 CPUs to your Minikube cluster.
Step 7: Check Minikube Status
Once the cluster is up and running, you can check its status by executing:
minikube status
You should see output like this:
makefile
minikube
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured
This confirms that your Minikube cluster is running correctly.
Conclusion
You can now start deploying applications and exploring Kubernetes locally. Minikube is an excellent way to familiarize yourself with Kubernetes features without needing a full cloud environment.
Top comments (0)