Does GKE use an overlay network?

2/16/2019

GKE uses the kubenet network plugin for setting up container interfaces and configures routes in the VPC so that containers can reach eachother on different hosts.

Wikipedia defines an overlay as a computer network that is built on top of another network.

Should GKE's network model be considered an overlay network? It is built on top of another network in the sense that it relies on the connectivity between the nodes in the cluster to function properly, but the Pod IPs are natively routable within the VPC as the routes inform the network which node to go to to find a particular Pod.

-- dippynark
google-compute-engine
google-kubernetes-engine
kubernetes
networking

1 Answer

2/21/2019

VPC-native and non VPC native GKE clusters uses GCP virtual networking. It is not strictly an overlay network by definition. An overlay network would be one that's isolated to just the GKE cluster.

VPC-native clusters work like this:

Each node VM is given a primary internal address and two alias IP ranges. One alias IP range is for pods and the other is for services. The GCP subnet used by the cluster must have at least two secondary IP ranges (one for the pod alias IP range on the node VMs and the other for the services alias IP range on the node VMs).

Non-VPC-native clusters:

GCP creates custom static routes whose destinations match pod IP space and services IP space. The next hops of these routes are node VMs by name, so there is instance based routing that happens as a "next step" within each VM.

I could see where some might consider this to be an overlay network. I don’t believe this is the best definition because the pod and service IPs are addressable from other VMs, outside of GKE cluster, in the network.

For a deeper dive on GCP’s network infrastructure, GCP’s network virtualization whitepaper can be found here.

-- Ashik Mahbub
Source: StackOverflow