What are Linux network namespaces and veth pairs?
IntermediateConceptKubernetes, Containers, MTU & Performance Basics
Answer
A network namespace is an isolated copy of the network stack (interfaces, routes, iptables, sockets). A veth pair is a virtual cable with two ends; one end in the container namespace, the other in the host or a bridge. Docker and Kubernetes use them for every container or pod.
ip netns add demo
ip link add v0 type veth peer name v1
ip link set v1 netns demo
ip netns exec demo ip addr add 10.9.0.2/24 dev v1
More on Kubernetes, Containers, MTU & Performance Basics
What are the basic Kubernetes networking rules?BeginnerWhat are the Service types in Kubernetes?BeginnerWhat is the difference between a Service and an Ingress?BeginnerHow does kube-proxy implement Services?AdvancedHow does DNS work for Services and pods in Kubernetes?IntermediateWhat is a CNI plugin and how do the main ones differ?Intermediate