Install Minikube 

Install Minikube
This tutorial explains the steps to install minikube on macOS, Windows, and Linux systems. 

 

Kubernetes is an open-source container-orchestration system for automating application deployment, management, and scaling. It was initially designed by Google and is now managed and maintained by the Cloud Native Computing Foundation. 

Kubernetes helps to enable the different operations of an elastic web server framework for cloud applications. Kubernetes can support data center outsourcing to public cloud service providers or can be used for web hosting at scale. Users can deploy both website and mobile applications with complex custom code using Kubernetes on commodity hardware to lower the costs of web server provisioning with public cloud hosts and optimize software development processes.

Minikube is a utility that users can use to run Kubernetes (k8s) on their local machine. Minikube creates a single node cluster contained in a VM (virtual machine). The minikube cluster lets the user demo Kubernetes operations without requiring the time and resource-consuming installation of full-blown Kubernetes.

The flexibility of minikube enables users to perform development tasks, try out Kubernetes deployments, or test configurations quickly. Minikube is especially useful for users who are new to Kubernetes since it enables them to gain familiarity with basic concepts of Kubernetes. For minikube to work, all that a user need is Docker (or similarly compatible) container or a Virtual Machine environment, and Kubernetes is a single command away: 

 

minikube start

 

In this tutorial, we will learn about the steps to install minikube on macOS, Windows, and Linux systems.

Prerequisites 
  • 2 CPUs or more
  • 20GB of free disk space
  • 2GB of free memory
  • Container or virtual machine managers, such as Hyperkit, Docker, Kernel-based Virtual Machine (KVM), Hyper-V, Parallels, Podman, VirtualBox, or VMWare
  • Network connection

 

Step 1: Installation

In order to install the latest minikube releases on x86-64 architecture, follow the below steps:

 

Operating System ArchitectureRelease TypeInstaller TypeSteps
 

 macOS

 

 x86-64StableBinary downloadIn order to install the latest minikube stable release on x86-64 macOS using binary download, execute the following commands:

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-darwin-amd64

sudo install minikube-darwin-amd64 /usr/local/bin/minikube

 x86-64BetaBinary downloadIn order to install the latest minikube beta release on x86-64 macOS using binary download, execute the following commands:

r=https://api.github.com/repos/kubernetes/minikube/releases

curl -LO $(curl -s $r | grep -o ‘http.*download/v.*beta.*/minikube-darwin-amd64’ | head -n1)

sudo install minikube-darwin-amd64 /usr/local/bin/minikube

 x86-64StableHomebrewIn order to install the latest minikube stable release on x86-64 macOS using Homebrew, execute the following:

If the Brew Package Manager is installed, execute the following command:

 

brew install minikube

 

If which minikube fails after installation via brew, users may have to remove the old minikube links and link the newly installed binary. For that, execute the following commands:

 

brew unlink minikube

brew link minikube

Linux x86-64StableBinary downloadIn order to install the latest minikube stable release on x86-64 Linux using binary download, execute the following commands:

 

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64

sudo install minikube-linux-amd64 /usr/local/bin/minikube

 x86-64StableDebian packageIn order to install the latest minikube stable release on x86-64 Linux using the Debian package, execute the following commands:

 

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb

sudo dpkg -i minikube_latest_amd64.deb

 x86-64StableRPM packageIn order to install the latest minikube stable release on x86-64 Linux using RPM package, execute the following commands:

 

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-latest.x86_64.rpm

sudo rpm -Uvh minikube-latest.x86_64.rpm

 x86-64BetaBinary downloadIn order to install the latest minikube beta release on x86-64 Linux using binary download, execute the following commands:

 

r=https://api.github.com/repos/kubernetes/minikube/releases

curl -LO $(curl -s $r | grep -o ‘http.*download/v.*beta.*/minikube-linux-amd64’ | head -n1)

sudo install minikube-linux-amd64 /usr/local/bin/minikube

 x86-64BetaDebian packageIn order to install the latest minikube beta release on x86-64 Linux using Debian package, execute the following commands:

 

r=https://api.github.com/repos/kubernetes/minikube/releases

u=$(curl -s $r | grep -o ‘http.*download/v.*beta.*/minikube_.*_amd64.deb’ | head -n1)

curl -L $u > minikube_beta_amd64.deb && sudo dpkg -i minikube_beta_amd64.deb

 x86-64BetaRPM packageIn order to install the latest minikube beta release on x86-64 Linux using RPM package, execute the following commands:

 

r=https://api.github.com/repos/kubernetes/minikube/releases

u=$(curl -s $r | grep -o ‘http.*download/v.*beta.*/minikube-.*.x86_64.rpm’ | head -n1)

curl -L $u > minikube-beta.x86_64.rpm && sudo rpm -Uvh minikube-beta.x86_64.rpm

Windows x86-64Stable.exe downloadIn order to install the latest minikube stable release on x86-64 Windows using .exe download, follow the below steps:

1. First, download the latest minikube release using the following URL:

 

https://storage.googleapis.com/minikube/releases/latest/minikube-installer.exe

 

or if curl is already installed, execute the following commands:

 

curl -Lo minikube.exe https://github.com/kubernetes/minikube/releases/latest/download/minikube-windows-amd64.exe

New-Item -Path “c:\” -Name “minikube” -ItemType “directory” -Force

Move-Item .\minikube.exe c:\minikube\minikube.exe -Force

 

2. Add the minikube binary into the PATH. When executing the below command, make sure to run Powershell as the admin user.

 

$oldpath=[Environment]::GetEnvironmentVariable(“Path”, [EnvironmentVariableTarget]::Machine)

if($oldpath -notlike “*;C:\minikube*”){`

  [Environment]::SetEnvironmentVariable(“Path”, $oldpath+”;C:\minikube”, [EnvironmentVariableTarget]::Machine)`

}

 

If we have used a CLI to perform the installation, make sure to close that CLI and open a new one before proceeding.

 x86-64StableWindows Package ManagerIn order to install the latest minikube stable release on x86-64 Windows using Windows Package Manager, execute the following command:

 

winget install minikube

 x86-64StableChocolateyIn order to install the latest minikube stable release on x86-64 Windows using Chocolatey, execute the following command:

 

choco install minikube

 x86-64Beta.exe downloadIn order to install the latest minikube beta release on x86-64 Windows using .exe download, follow the below steps:

1. First, download the latest minikube beta release using the following URL:

 

https://github.com/kubernetes/minikube/releases/download/v1.22.0-beta.0/minikube-installer.exe

 

or if curl is already installed, execute the following commands:

 

$r=’https://api.github.com/repos/kubernetes/minikube/releases’

$u=curl -s $r | Select-String -Pattern ‘http.*download/v.*beta.*/minikube-windows-amd64.exe’ | Select Matches -First 1

curl -Lo minikube.exe $u.Matches.Value

New-Item -Path “c:\” -Name “minikube” -ItemType “directory” -Force

Move-Item .\minikube.exe c:\minikube\minikube.exe -Force

 

2. Add the minikube binary into the PATH. When executing the below command, make sure to run Powershell as the admin user.

 

$oldpath=[Environment]::GetEnvironmentVariable(“Path”, [EnvironmentVariableTarget]::Machine)

if($oldpath -notlike “*;C:\minikube*”){`

  [Environment]::SetEnvironmentVariable(“Path”, $oldpath+”;C:\minikube”, [EnvironmentVariableTarget]::Machine)`

}

 

If we have used a CLI to perform the installation, make sure to close that CLI and open a new one before proceeding.

 

Step 2: Start the Cluster

Open a terminal with administrator access (but not logged in as root) and execute the following command:

 

minikube start

 

If minikube fails to start, see the drivers page for help setting up a compatible virtual machine manager or container.

 

Step 3: Interact with the Cluster 

If the user already has kubectl installed, they can now use it to access their new cluster by executing the following command:

 

kubectl get po -A

 

Minikube can alternatively download the appropriate version of kubectl if the user does not mind the double-dashes in the command line:

 

minikube kubectl -- get po -A

 

Some services (such as the storage-provisioner) may not be initially running in this cluster. This is a common condition during cluster bring-up and will get resolved by itself momentarily. For additional insight into the user’s cluster state, minikube bundles the Kubernetes Dashboard, allowing the user to get quickly acclimated to their new environment. In order to open the Kubernetes Dashboard, execute the following command:

 

minikube dashboard

 

Step 4: Manage the Cluster 

In order to pause the Kubernetes without impacting the deployed applications, execute the following command:

 

minikube pause

 

Execute the following command to unpause a paused instance:

 

minikube unpause

 

In order to halt or stop the cluster, execute the following command:

 

minikube stop

 

In order to increase the default memory limit (requires a restart), execute the following command:

 

minikube config set memory 16384

 

Execute the following command to browse the catalog of easily installed Kubernetes services:

 

minikube addons list

 

In order to create a second cluster running an older Kubernetes release, execute the following command:

 

minikube start -p aged --kubernetes-version=v1.15.1

 

Execute the following command to delete all of the minikube clusters:

 

minikube delete --all

 

Conclusion

This tutorial presents the steps to install minikube on macOS, Windows, and Linux systems. Hope this tutorial was helpful, and do reach out to us if you have any queries or suggestions.

Share this post

Services to Explore

Stay up to date!

Stay up to date with the Web Hosting, Cloud and Server Management Industry News and Tutorials!

We will send you only the relevant emails, and we respect your privacy. Please review our privacy policy for more info.

Docker Consulting Services

Focus on your business, and let us work on your Docker Projects!
From what you are reading, it seems you are interested in Kubernetes and related technologies. If you have a moment to spare, please take a look at our Kubernetes Consulting Services, which might interest you even more!
Kubernetes Consulting Services

Value-Added Services

We have services that can help you run a successful business. With us, you don't have to worry about these areas because our experts will take care of it for you.

Introducing - WPHealers!

Complete WordPress Management, 24x7 Support & White Label Agency Plans!

WordPress migration service, security, white-label reseller services and lot more! Grab the introductory deals now!

WPHealers

ServerHealers uses cookies.