weaveworks / weave

Simple, resilient multi-host containers networking and more.
https://www.weave.works
Apache License 2.0
6.62k stars 671 forks source link

Per pod/namespace subnet(s) within Kubernetes CNI #3959

Open jbreed opened 2 years ago

jbreed commented 2 years ago

I have read through the Weave documentation and it is unclear how to accomplish this or if this is feasible within Weavenet.

My first attempt was attempting to leverage Multus CNI with Weave for secondary interfaces and VPC CNI for eth0 (EKS environment); however, although I was able to get addressing to work properly via network definitions, nothing was actually able to communicate. Pods received IP addresses, but couldn't even ping pods on the same node. I suspect the issue with Weave not working was due to system-related iptables rules as I was also running the VPC CNI for eth0 interfaces. Given the docs explain clearing these, my guess is there can be conflicts?

After reading the weave docs about setting subnets/ip allocations, I thought maybe Weave could do this without needing Multus (multus working via modified IPAM configurations on a per-pod/network-definition basis). I got it all deployed, pods can reach each other; however, the weave-proxy mechanism of environment variables doesn't work and given there is one configuration for the CNI I don't see how to accomplish this. Everything currently is being dumped onto the same default subnet with no clear way of doing something similar to WEAVE_CIDR environment variable for the proxy, or the --ip for simple docker.

Any suggestions?