kubernetes-sigs / kind

Kubernetes IN Docker - local clusters for testing Kubernetes
https://kind.sigs.k8s.io/
Apache License 2.0
13.02k stars 1.51k forks source link

Some problems of foreign visits #3616

Closed txbxxx closed 1 month ago

txbxxx commented 1 month ago

After setting up the kubernetes server using wsl and kind, I have a mysql service that needs to be opened to the outside world. What should I do if I use the nodeport of service to open the port, which can only be accessed on the current wsl but cannot be accessed externally?

txbxxx commented 1 month ago

The network segment of nodes in my cluster is 172.18.0.0/16. My windows can ping 172.18.0.1, but cannot ping the same two container nodes. Why?

aojea commented 1 month ago

WSL runs the containers in their own VM

stmcginnis commented 1 month ago

Some useful information can be found here: https://kind.sigs.k8s.io/docs/user/using-wsl2/#accessing-a-kubernetes-service-running-in-wsl2

txbxxx commented 1 month ago

WSL 在其自己的 VM 中运行容器 Yes, I am currently unable to make Pods in kubernetes accessible to wsl hosts

txbxxx commented 1 month ago

Some useful information can be found here: https://kind.sigs.k8s.io/docs/user/using-wsl2/#accessing-a-kubernetes-service-running-in-wsl2

https://kind.sigs.k8s.io/docs/user/using-wsl2/#kubernetes-service-with-session-affinity Is it executed directly on the wsl host? Or in a kind of cluster node?

BenTheElder commented 1 month ago

Is it executed directly on the wsl host? Or in a kind of cluster node?

the host.

txbxxx commented 1 month ago

它是否直接在 wsl 主机上执行?还是在一种集群节点中?

主机。

thanks!