Docker networking

Let's now review how docker networking works before getting into Kubernetes networking. For container networking, there are different modes: bridge, none, overlay, macvlan, and host. We've learned about the major modes in Chapter 2DevOps with Containers. Bridge is the default networking model. Docker creates and attaches a virtual Ethernet device (also known as veth) and assigns a network namespace to each container.

The network namespace is a feature in Linux that is logically another copy of a network stack. It has its own routing tables, ARP tables, and network devices. This is a fundamental concept of container networking.

Veth always comes in pairs; one is in the network namespace and the other is in the bridge. When ...

Get DevOps with Kubernetes - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.