Setting up kubectl (kubernetes), minikube on windows

Anil Thirunagari
2 min readAug 2, 2020

Prequesits

Docker for windows
Powershell

Installing kubectl

Download kubectl from https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl-binary-with-curl-on-windows

Copy “kubectl” to “D:/kube” folder
Add in evn’ variable path “D:/kube”
Verify using “kubectl version — client”

Installing minikube

Download from https://kubernetes.io/docs/tasks/tools/install-minikube/

copy this to D:/kube

run below command in PowerShell

PS C:\WINDOWS\system32> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All

Now open “Hyper-V Manager”,
Click on “Virtual Switch Manager”,
select “Internal” and click “Create Virtual Switch”
Name it “minikube” and click “ok”

Now open “Control Panel\Network and Internet\Network and Sharing Center”
Click on Current connection, in my case, it is “Wi-Fi (skyworth)”
Click on “properties”, go to “sharing” tab
Enable “Allow other network users to connect through this computer…”
And in dropdown select “minikube”

Starting minikube

run this command in powershell
PS C:\Users\dell> minikube start — vm-driver=”hyperv” — hyperv-virtual-switch=”minikube”

and verify using “kubectl get nodes”

If you see the above, you are all set.

Happy Programming.

--

--