by KaiserPro · 7y ago · 0 comments
Giving containers their own nic, and IP isn't hard, and in most cases is >> faster than spending time using some immature tunnelling protocol.
I can see that doing multi-cloud deploys with transparent failover might benefit from a VPN, but short of operating on a hostile network I can't see its worth the heartache to deploy an overlay network.
This meant that we felt an overlay network was the most pragmatic (works out of the box) solution, even though IPIP has some drawbacks in adding complexity (within the Kubernetes cluster) and hashes across router ECMP / NIC RX queues poorly (neither look into the inner IP packet as part of hashing). It was definitely a concern of ours, though, considering we'd very intentionally avoided IPIP in our load balancer (https://github.blog/2018-08-08-glb-director-open-source-load... has a write-up of why).
We've considered the alternative of announcing a /24 or /25 or similar via BGP on each Kubernetes node, which is supported by systems like Calico, but so far the limitations of IPIP haven't caused an issue because of our Kubernetes clusters being large enough to hash evenly regardless of the addition of an overlay network, so we haven't needed to migrate. It's definitely an interesting trade-off on complexity overall, though - simple routed networks are much easier to understand than another layer of encapsulation.
You don't even need to give them actual nics, just veth pairs with routing (some CNI plugons do just that btw).
I think a big part of why overlay nets are so common is that a lot of the engineers deploying these systems have a shaky or non existant understanding of networking and routing, they are stuck in the "local network and a default route" model and if you only have that, overlay it is...
at least that way you can dump them on an entirely different vlan, if you want separation. The best part is: you're using your cloud provider's networking tools (lets be honest it is a cloud and they are way more likely to work)
I know there is simpler ones that don’t use BGP, but I don’t remember their names. For example there is one for AWS that uses ENI interfaces and pass them directly to containers (you’re obviously limited by the number of ENI you can attach to a particular host, then). There is also one that configures routes in the VPC routing table, and a similar one for GCP.