If I install microk8s on a normal Linux machine, the k8s API server is bound to the host network, which is accessible from a remote machine.
But on WSL 2, the microk8s cluster lives in a virtual machine-like environment. So, machines that can reach my Windows box still cannot reach my microk8s cluster.
I find a way to port forwarding on my Windows box so remote requests can finally hit my microk8s cluster. But I got the following error when I tried to use
Unable to connect to the server: x509: certificate is valid for 127.0.0.1, 10.152.183.1, 172.26.203.192, not 192.168.86.109 error getting namespace list error: could not list namespaces (is the cluster accessible?)
192.168.86.109 is my Windows LAN IP.
Next, I just need to find a way to update the certificate, so it accepts my host IP.
minikube has a
--apiserver-ips option which allows you to add extra IPs to the certificate. But I could not find how to do this with microk8s.
So my question is it possible to add extra IPs to the apiserver certificate in microk8s?