KodeCloud CKA Networking Prerequisites
Links: 111 KodeCloud Index
Network Namespaces¶
- When a container is created we create a network namespace for it.
- Because of this it has no visibility of network related information on the host.
- Within its namespace the container can have its own virtual interface, routing and arp tables.
- Diagram:
- Creating a network namespace:
ip netns add <namespace-name>
- Listing the network namespaces:
ip netns
- Viewing the interfaces inside the interface:
ip netns exec <namespace-name> ip link
- Or
ip -n <namespace-name> link
- Or
- In the newly create network namespace we won't see other interfaces this means we have successfully prevented the namespace network from seeing the host network.
- Similarly we won't see any entries for arp (
ip netns exec <namespace-name> arp
) and route (ip netns exec <namespace-name> route
)
Recap¶
Last updated: 2023-05-25