I am working through the Kind tutorial for local Kubernetes development, and I've reached the section on LoadBalancer configuration. I'm encountering an issue where the service seems to be running but is not accessible either within WSL2 or Windows. Here's what I've tried so far to troubleshoot the issue:
❯ docker network inspect -f '{{.IPAM.Config}}' kind
[{172.18.0.0/16 172.18.0.1 map[]} {fc00:f853:ccd:e793::/64 fc00:f853:ccd:e793::1 map[]}]
❯ kubectl get services foo-service
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
foo-service LoadBalancer 10.96.133.109 172.18.255.200 5678:30686/TCP 25h
❯ kubectl get pods -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
bar-app 1/1 Running 1 (9h ago) 25h 10.244.0.2 kind-control-plane <none> <none>
foo-app 1/1 Running 1 (9h ago) 25h 10.244.0.3 kind-control-plane <none> <none>
❯ kubectl run --rm -it --image=nicolaka/netshoot netshot -- /bin/bash
If you don't see a command prompt, try pressing enter.
netshot:~# curl 172.18.255.200:5678
bar
netshot:~# curl 172.18.255.200:5678
foo
netshot:~# exit
exit
Session ended, resume using 'kubectl attach netshot -c netshot -i -t' command when the pod is running
❯ curl -v --max-time 10 172.18.255.200:5678
* Trying 172.18.255.200:5678...
* Connection timed out after 10000 milliseconds
* Closing connection 0
curl: (28) Connection timed out after 10000 milliseconds
What am I missing? Any guidance on how to resolve this issue would be greatly appreciated.
UPDATE: Additional tests inside the control plane.
user@wsl-host:~$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
<container-id> kindest/node:v1.27.3 "/usr/local/bin/entr…" 2 days ago Up 14 minutes 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 127.0.0.1:33911->6443/tcp kind-control-plane
user@wsl-host:~$ docker exec -it <container-id> bash
root@kind-control-plane:/# curl 172.18.255.200:5678
foo