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 2, DevOps 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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.