Installing Kubernetes Cluster using MiniKube
Introduction#
Setting up Kubernetes from scratch can be a real challenge, especially if you’re just starting out. There’s a lot to configure—nodes, networking, cloud integration—it can feel overwhelming pretty fast. But what if you just want to learn Kubernetes without all the hassle?
That’s where Minikube comes in. It’s a lightweight tool that lets you run a Kubernetes cluster locally without needing multiple machines or a cloud provider. I remember the first time I tried setting up Kubernetes manually—I spent hours troubleshooting configs, only to realize I could’ve just used Minikube to get things running in minutes.
If you’re looking for a quick and easy way to test Kubernetes, experiment with deployments, or just get comfortable with the basics, Minikube is the perfect starting point. In this guide, I’ll walk you through the installation process step by step, so you can get your own local cluster up and running without any headaches.
Prerequisites#
Before installing Minikube, ensure your system meets the following requirements:
- Operating System: Windows, macOS, or Linux
- RAM: At least 4GB
- CPU: A 64-bit processor with virtualization enabled (VT-x or AMD-V)
- Hypervisor: VirtualBox, Docker, Hyper-V, or KVM (for virtualization)
- Installed Tools:
- Kubectl (Kubernetes CLI)
- A supported hypervisor (VirtualBox, Docker, or Hyper-V)
Steps to setup Minikube on your machine#
You can visit the official documentation to see the minikube installation steps for mac, linux or windowns operating system.
Step-1 Download Minikube installer from the official website#
- Visit the official documentation and download the minikube installer
- After downloading install minikube on your machine by running the installer.
- To install the latest minikube stable release on x86-64 macOS using Homebrew you can run this command :
brew install minikube
- Ensure the minikube is accessible via the command line by running:
Output:
Step-2 Start Minikube#
Once Minikube is installed, you can start your local Kubernetes cluster with a single command:
Output:
By default, Minikube will select the best available hypervisor, but you can specify one manually. For example, to use Docker:
Once started, Minikube will:
✅ Download and configure the required Kubernetes components
✅ Set up a single-node Kubernetes cluster
✅ Provide you with a ready-to-use K8s environment
To check if the cluster is running, use:
Output:
Note :- If kubectl is not installed in your machine visit this page and follow the steps to install kubectl on your machine. By default kubectl comes with docker desktop so you don’t need to install kubectl manually if you have docker desktop.
kubectl
(pronounced "cube control") is the command-line tool used to interact with a Kubernetes cluster. It allows you to deploy applications, inspect resources, manage configurations, and troubleshoot issues within Kubernetes.
You can run docker ps command to see if minikube cluster is up and running
Now you are set to work with the kubernetes cluster on your machine.
Step-3 Explore Minikube commands#
Minikube Commands:#
minikube start
– Starts a Minikube cluster, creating a single-node Kubernetes setup locally.minikube stop
– Stops the Minikube cluster but retains the existing configuration.minikube delete
– Deletes the entire Minikube cluster, removing all resources and configurations.minikube status
– Displays the current status of the Minikube cluster, including nodes and components.minikube dashboard
– Launches the Kubernetes web-based dashboard for visual management of the cluster.minikube node add
– Adds a new node to the Minikube cluster, useful for testing multi-node Kubernetes setups.minikube node delete <node-name>
– Removes a specific node from the Minikube cluster, reducing the number of nodes.
Kubectl Commands:#
kubectl cluster-info
– Displays basic information about the cluster, including the control plane and services.kubectl get namespaces
– Lists all namespaces in the cluster, helping organize resources within different environments.kubectl get nodes
– Shows all nodes in the cluster along with their statuses.kubectl describe node <node-name>
– Provides detailed information about a specific node, including resource usage and conditions.
Conclusion#
In this blog, we walked through the steps to install and set up Minikube, making it easy to run a Kubernetes cluster on your local machine. Setting up Kubernetes manually can be complicated, but Minikube simplifies the process, allowing you to focus on learning and experimenting rather than troubleshooting configurations. Now that your cluster is up and running, you can start experimenting with deployments, scaling applications, and understanding how Kubernetes manages containerized workloads.