MiniShift setup on Windows: OpenShift on Windows
OpenShift is a great PaaS platform by Red Hat that leverages container technologies such as Docker and Kubernetes. If you want to try OpenShift but don’t want to set up a real, full-blown cluster this solution is for you. Minishift is a great way to test OpenShift capabilities without committing hardware to it. By using MiniShift you will set up a virtual machine on your hardware, this vm will be your very own one-machine cluster and when you’re done you can simply throw it away.
Why OpenShift on Windows?
OpenShift, Docker, Kubernets are all Linux-based solutions, made for and battle-tested on Linux. Installing OpenShift on Windows might seem strange, but it’s not. Well, most of the times OpenShift is installed on Windows just for testing or proof of concept purposes. (What is OpenShift?)
By installing MiniShift you will essentially download and install a Linux virtual machine configured with OpenShift, it is hence highly discouraged to use it in production.
- You need a machine capable of performing Virtualization.
- If you want to use HyperV, you need a compatible Windows edition (e.g. Windows 10 Pro. Windows 10 Home can’t.)
- At least 4GB of RAM (suggested).
MiniShift on Windows: HyperV or VirtualBox
The first thing you will need in order to begin is a hypervisor to run the Minishift virtual machine, you can either use:
- HyperV: the native Windows hypervisor.
- VirtualBox: an open source hypervisor by Oracle available on many operating systems.
Although the suggested hypervisor is VirtualBox you should be able to install it using HyperV without major issues, and by default Minishift will try to use the latter. In this tutorial you can use either one, I will assume you already have your hypervisor installed and running.
Getting MiniShift and setting environment
- First: download the Minishift executable, pick the one for Windows. The link takes you to the latest version, at the moment of writing this article the latest version was v1.10.0.
- Second: extract the content of the folder in a subdirectory of C:\ it’s best to avoid other drives/network drives. I suggest you to extract it in the C:\minishift subdirectory.
- Third: add the path you chose to the PATH environment variable. You can do so graphically or using the following PowerShell command:
PS> [Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\minishift", [EnvironmentVariableTarget]::Machine)
With the environment set, you’re just a few steps away from installing and using Minishift. Pick the steps associated with your hypervisor and open an elevated PowerShell prompt:
Enjoy OpenShift with MiniShift
Congratulations! You just installed minishift! You can now type minishift console to open the Web UI in your default browser! Don’t worry about the insecure connection, that’s just because the certificate is self-signed.
Now that you have OpenShift up and running, you can use the Web UI as well as the oc command line utility to interact with your OpenShift installation. Remember you still have the minishift executable that you can use to control the OpenShift vm.
PS> minishift start
PS> minishift stop
Deleting (erasing completely) OpenShift
PS> minishift delete
You are deleting the Minishift VM: 'minishift'. Do you want to continue [y/N]?: y
Deleting the Minishift VM...
Minishift VM deleted.
Latest posts by mark (see all)
- Set up a modern point-to-point VPN with WireGuard - 13 June 2018
- Microsoft to acquire GitHub: take a look at 3 awesome alternatives - 6 June 2018
- Minikube: Try Kubernetes on Windows without headaches - 30 May 2018