Minikube is a great tool for running Kubernetes locally on your machine. Let’s walk through the setup step by step.
What You Need First
Hypervisor: Minikube needs a virtual machine (VM) to run Kubernetes. You can use VirtualBox, VMware, Hyper-V (for Windows), or Docker. Make sure you’ve got one of these installed.
kubectl: This is the command-line tool for Kubernetes. You can get it from the Kubernetes website.
Installation Steps
Get Minikube
On Windows:
- Download the Minikube executable from the Minikube GitHub releases page. Look for
minikube-windows-amd64.exe
. - Rename the file to
minikube.exe
and put it in a folder that's in your system’sPATH
, likeC:\Program Files\
.
- Download the Minikube executable from the Minikube GitHub releases page. Look for
On macOS:
- The easiest way is to use Homebrew. Open a terminal and run:brew install minikube
- The easiest way is to use Homebrew. Open a terminal and run:
On Linux:
- Download the Minikube binary:
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
- Make it executable:
chmod +x minikube-linux-amd64
- Move it to a directory in your
PATH
:sudo mv minikube-linux-amd64 /usr/local/bin/minikube
- Download the Minikube binary:
Start Minikube
Open your terminal or command prompt.
To start Minikube, use the driver that matches your setup. For example, with VirtualBox:
minikube start --driver=virtualbox
Or with Docker:
minikube start --driver=docker
Minikube will now download and set up a virtual machine with Kubernetes. This might take a few minutes.
Check Everything’s Running
To see if Minikube is up and running:
minikube status
Verify that
kubectl
is set up to work with Minikube:kubectl cluster-info
You should see info about your Kubernetes cluster.
Optional: Open the Kubernetes Dashboard
Minikube includes a handy dashboard. To open it in your web browser, run:
minikube dashboard
Extra Tips
Updating Minikube: To check for updates, run:
minikube update-check
Stopping Minikube: When you’re done, you can stop it with:
minikube stop
Deleting Minikube: To remove the VM and everything associated with it:
minikube delete
And that’s it! You should now have Minikube up and running. If you hit any snags, the Minikube documentation and community are great resources.
No comments:
Post a Comment