Container Networking

Back to Networking

Docker Model

Uses host-private networking, using bridges to connect private network segments.

Kubernetes Model

For container orchestration to work, 4 problems need to be solved:

  1. highly coupled container to container communication (pods with localhost)
  2. pod to pod communication
  3. pod to service
  4. external to service

Notice that service is used to cover more dynamic cases of networking where endpoints may need to be discovered or externally exposed.

Pods are an abstraction layer which help to simplify networking from the end user's perspective. Each pod has its own IP address (effectively like a host) and has multiple containers (much like local processes) which can easily connect to one another

Flannel

Simple way to configure layer 3 (IP, ICMP) handling how traffic is transported between hosts