Who wants to run an OKD 4 SNC on their Windows 10 workstation? Me for one.
This is guide is geared towards people who want to try ODK 4 on an existing workstation (minimum 24GB of RAM) without purchasing additional hardware like a NUC or home lab server.
OpenShift (OCP) has CodeReady Containers where you can set up an OpenShift cluster on your local machine for development and testing purposes. Currently, the OKD version of CodeReady Containers is still in development. This guide will walk you through installing an OKD 4.5 Single Node Cluster on your Windows 10 (Pro, Enterprise, or Education) workstation using Hyper-V.
For this installation, I used a Windows 10 Pro laptop with 32GB RAM. Here is a breakdown of the virtual machines and network layout:
Open a PowerShell console as Administrator and run the following command:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
If the command couldn’t be found, make sure you’re running PowerShell as Administrator.
When the installation has completed, reboot.
Open a PowerShell console as Administrator and run the following commands to create a Virtual Switch:
$Natswitchname = “OKD4-NATSwitch”
$NATNetwork = “192.168.200.0”
$NATrouteraddress = “192.168.200.1”
$NATPrefixLength = “24”
New-VMSwitch –SwitchName $Natswitchname –SwitchType Internal –Verbose
$natswitch = Get-NetAdapter | where {(($_.name -like (“vEthernet ($Natswitchname)”)))}
New-NetIPAddress $NATrouteraddress -PrefixLength $NATPrefixLength -InterfaceIndex $natswitch.interfaceindex -Verbose
$NATNetworkFull = $NATNetwork + “/” + $NATPrefixLength
New-NetNat -Name HyperV-NatNetwork -InternalIPInterfaceAddressPrefix $NATNetworkFull -Verbose
Open the Hyper-V Manager, then Virtual Switch Manager, and verify the OKD4-NATSwitch has been created.
#openshift #okd #single-node-cluster #kubernetes #windows-10 #node