Given two pods deployed on different nodes:
- myapp pod deployed on apps node
- wireguard pod deployed on vpn node, using a subnet like 172.16.30.0/16
I need myapp to be able to be able to route traffic to the wireguard peers (VPN clients) having IPs in the subnet 172.16.30.0/16, the traffic is mostly ICMP probes, SSH and iperf tests.
I already enabled IP forwarding on the wireguard pode and VPN node, now I need to understand: how do I set up routes in a way that plays nicely with the Kubernetes networking model?
That is, I want to instruct the myapp pods to send traffic for the subnet used by wireguard (172.16.30.0/16) to the wireguard container so that the traffic is routed to the VPN clients.
Is the problem clear?
Cluster information:
Kubernetes version: 1.23
Cloud being used: Linode / Vultr / Bare metal