Friday, March 10, 2023

How to run Kubernetes on Windows 11

 I am documenting this because it took a lot of effort to get to these steps and will be useful to someone else.

One cannot use WSL and Docker to run networking on Kubernetes. See this note

> The network is limited if using the Docker driver on Darwin, Windows,

> or WSL, and the Node IP is not reachable directly.


The solution was to 


1) remove minikube from WSL


    minikube delete --purge


2) Then installed VirtualBox on Windows


3) Install Ubuntu


4) Install docker then minikube on Ubuntu


5) Start minikube


    minikube start --memory=6g --cpus=4 --driver=docker --cni=calico


If necessary, set the context:

kubectl config view

kubectl config use-context minikube

kubectl config set-context --current --namespace=default


Now

$ k get pods -A

NAMESPACE     NAME                               READY   STATUS    RESTARTS      AGE

kube-system   coredns-787d4945fb-c5lf2           1/1     Running   0             76s

kube-system   etcd-minikube                      1/1     Running   0             90s

kube-system   kube-apiserver-minikube            1/1     Running   0             88s

kube-system   kube-controller-manager-minikube   1/1     Running   0             88s

kube-system   kube-proxy-ctcsl                   1/1     Running   0             76s

kube-system   kube-scheduler-minikube            1/1     Running   0             90s

kube-system   storage-provisioner                1/1     Running   1 (64s ago)   85s


Now all the networking that earlier failed, is now working!


TaDa! 😋

No comments:

Blog Archive