Accessing kubernetes External IP ( LoadBalancer ) from windows 10 when the cluster running under WSL 2
Win10 should be unable to access your external IP stated by the LoadBalancer service, unless it can get DNS information from the K3s LoadBalancer component (Traefik) or join Traefik's internal network.
If you cannot do kubectl port forward. I suggest you to use NodePort
instead of LoadBalancer
for your nifi.You should be able to access your service from win10 through the port stated by NodePort
service also.
You can check a simple NodePort example below
$ kubectl get pod,svc --selector=run=my-appNAME READY STATUS RESTARTS AGEpod/my-app-85bcd5f479-f7dgj 1/1 Running 0 31mpod/my-app-85bcd5f479-p7lgz 1/1 Running 0 31mNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGEservice/my-app NodePort 10.107.182.56 <none> 8080:31684/TCP 31m
You can now access the app from both WSL2 and Win10
$ curl localhost:31684<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Index page</title></head><body>The hostname of the container is <b>my-app-85bcd5f479-f7dgj</b> and its IP is <b>10.1.45.156</b>.</body>>curl.exe localhost:31684<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Index page</title></head><body>The hostname of the container is <b>my-app-85bcd5f479-f7dgj</b> and its IP is <b>10.1.45.156</b>.</body></html>