Deep dive into container networking:
Network Namespace: Each container has isolated networking (own IP, routing table, iptables).
1# Create namespace2ip netns add container13ip netns list4ip netns exec container1 ip addr
Veth Pair (virtual cable):
1# One side in the container, the other on the host2ip link add veth0 type veth peer name veth13ip link set veth1 netns container14ip addr add 10.0.0.1/24 dev veth05ip link set veth0 up6ip netns exec container1 ip addr add 10.0.0.2/24 dev veth17ip netns exec container1 ip link set veth1 up
Bridge (switch):
1ip link add br0 type bridge2ip link set veth0 master br03ip link set veth2 master br04ip addr add 10.0.0.1/24 dev br05ip link set br0 up
CNI plugins:
IPAM (IP Address Management):
Service networking (kube-proxy):