If you want to play with kubernetes, there are many way to play with it online, but if you plan to play with it in your machine specially Windows 10, there is a solution provided by Kubernetes called MiniKube, there are many ways to install it.
In this quick thoughts article I will go though how to install minikube using Chocolatey.
There is a revolutionary installer available today called Choco, Chocolatey is a package manager for Windows (like apt-get but for Windows). It was designed to be a decentralized framework for quickly installing applications and tools that you need. It is built on the NuGet infrastructure currently using PowerShell as its focus for delivering packages from the distros to your door, err computer.
Since Chocolatey is a package manager they made its installation as easy as a single command, you deploy it using today’s devloper method (DevOps thingy) of calling and executing the installation script from vendor websit.
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
This looks easy but you can check the installation steps from their website for more detail, I will list them here just for reference:
- First, ensure that you are using an administrative shell – you can also install as a non-admin, check out Non-Administrative Installation.
- Copy the text specific to your command shell – cmd.exe or powershell.exe.
- Paste the copied text into your shell and press Enter.
- Wait a few seconds for the command to complete.
- If you don’t see any errors, you are ready to use Chocolatey! Type
choco -?now, or see Getting Started for usage instructions.
Checolatey maintain application packages that allows you to deploy them with single command, you can check them in this link
Minikube has Chocolatey package that can be installed from this URL https://chocolatey.org/packages/Minikube
After finishing downloading and installing minikube
choco install minikube
Simply you can start minikube by typing the below command
The command above will create VM on VirtualBox, keep in mind that you will get the below error if you start minikube without installing Hyper Visor like HyperV or VirtualBox
To install VirtualBox from this link https://www.virtualbox.org/wiki/Downloads
If you have Hyper-V enabled on your Windows 10 you can just run the below command
minikube start --vm-driver hyperv
That’s all for installation, then you can start playing kubernetes and kubectl command.
Minikube on Windows 10 with Hyper-V