Kubernetes networking issues

Problem Description:

I have deployed a Kubernetes cluster on VPS servers and I’m trying to set up two pods with V2Ray, each of which should be accessible on a specific port via a NodePort service. However, I am encountering several issues:

  1. The V2Ray pods start up correctly, but traffic is not passing through the specified ports. I used NodePort, and the ports are assigned correctly, but traffic still does not pass through. I have checked the configuration of the pods, services, network policies, and iptables rules, and everything seems to be correct: the pods are listening on the required ports, no network policies are in place, and the iptables rules do not block the traffic.
  2. Network policies and Calico/Flannel rules also seem correct, but traffic is not passing. I checked connectivity inside the pods, and everything works, but external access is still unavailable.

Questions:

  1. Are there any additional settings needed in Calico or Flannel to ensure they are not blocking traffic? Could it be that traffic is being blocked at the level of these network plugins?
  2. Are there specific recommendations for configuring NAT or routing for Kubernetes on VPS to ensure proper access to pods through external ports?
  3. What additional steps can I take to diagnose the problem? What tools or methods can help more accurately determine where traffic is being blocked?

Any advice or recommendations for diagnosing and resolving this issue would be greatly appreciated. Thank you in advance for your help!

Cluster information:

Kubernetes version: v1.28.12
Cloud being used: None (I used VPS)
Host OS: Ubuntu 22.04