Shared Network Namespace: All containers within a pod share the same network namespace. This means they share the same IP address, network interfaces, port space, and routing tables.
localhost Communication: Because they share the same network namespace, containers within a pod can communicate with each other using localhost
. This is the most efficient way for them to communicate.
Single IP Address: The pod itself is assigned a single IP address within the Kubernetes cluster's network. All containers in the pod use this same IP address.
Port Conflicts: Since they share the same port space, two containers within the same pod cannot listen on the same port. This is a common source of confusion.
*****
A) Containers in a pod share a single IP address.
B) Sharing networking resources means they share the same port space, leading to conflicts if they try to use the same port.
D) Port allocation is handled by the operating system within the shared network namespace. No explicit coordination like SystemV semaphores is required.