CodeBlanks Logo Icon CodeBlanks

Installing Minikube

Learn to install and start Minikube.

Installing Minikube

Minikube is a single executable. You also need kubectl to talk to the cluster (Minikube also offers its own compatible version with minikube kubectl --):

# Linux (x86-64)
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
# macOS
brew install minikube
# Windows
winget install Kubernetes.minikube

For the Docker driver, it's enough that Docker is installed and running.

Version compatibility

kubectl must be at most one minor version ahead of or behind the cluster's version. kubectl version shows both together; a specific Kubernetes version can be requested from Minikube:

$ kubectl version
Client Version: v1.31.1
Server Version: v1.31.2
$ minikube start --kubernetes-version=v1.30.5

Practice Verify the installation

Write three commands: show the Minikube version (minikube version); start a cluster with Kubernetes v1.31.2 and the Docker driver; show the kubectl client and server versions.

Starter code

terminal
# buraya yaz

Sample solution

terminal
minikube version
minikube start --driver=docker --kubernetes-version=v1.31.2
kubectl version

Expected output

minikube version: v1.34.0
😄  minikube v1.34.0 on Ubuntu 24.04
✨  Using the docker driver based on user configuration
🏄  Done! kubectl is now configured to use "minikube" cluster
Client Version: v1.31.1
Server Version: v1.31.2

Questions and answers

Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.

1 How can you send commands to a Minikube cluster without kubectl installed?

  • minikube kubectl -- get pods Correct answer
  • minikube get pods
  • docker get pods
  • It isn't possible

Explanation: Arguments after -- are passed to kubectl.

2 Start with a specific Kubernetes version.

Question
minikube start ____=v1.30.5
Answer
minikube start --kubernetes-version=v1.30.5

Explanation: This flag chooses the cluster version.

3 Match.

Term Meaning
brew install minikube macOS installation
winget Windows installation
kubectl version Client and server version
± one minor version kubectl compatibility

All lessons in Intermediate