Networking for DevOps โ Practical & Interview-Focused Guide
Why Networking is Important for DevOps?
DevOps engineers manage:
- Cloud infrastructure
- Containers & Kubernetes
- CI/CD pipelines
- Monitoring & security
All of these depend on networking.
๐งฑ Core Networking Concepts (Must-Know)
๐น IP Addressing
- IPv4 / IPv6
- CIDR (/24, /16)
- Private IPs:
- 10.0.0.0/8
- 172.16.0.0/12
- 192.168.0.0/16
๐น Subnetting
- Divide networks for:
- Security
- Performance
- Example:
VPC: 10.0.0.0/16
Subnet: 10.0.1.0/24
๐น DNS (Very Important)
- Converts name โ IP
- Used in:
- Kubernetes services
- Load balancers
- Microservices
Tools:
nslookup google.com
dig google.com
โ๏ธ Cloud Networking (AWS / Azure)
AWS Example
- VPC
- Subnets (Public / Private)
- Internet Gateway
- NAT Gateway
- Security Groups
- NACL
Azure Example
- VNet
- Subnets
- NSG
- Load Balancer
๐ณ Container Networking
Docker
- Bridge network
- Host network
- Overlay network
Command:
docker network ls
Kubernetes Networking (Interview Favorite)
- Every Pod gets an IP
- No NAT between Pods
- Service provides stable IP
Service types:
- ClusterIP
- NodePort
- LoadBalancer
- Ingress
๐ Load Balancing
- Distributes traffic
- Types:
- L4 (TCP/UDP)
- L7 (HTTP/HTTPS)
Examples:
- NGINX
- AWS ALB / NLB
๐ DevOps Networking Security
- Firewalls
- Security Groups / NSG
- Network Policies (K8s)
- Zero Trust
- TLS / HTTPS
๐งช Troubleshooting Tools (Must Know)
ping
traceroute
curl
netstat
ss
tcpdump
๐ CI/CD & Networking
- GitHub Actions runners
- Jenkins agents
- Webhooks
- Firewall port opening
๐ฏ Interview One-Line Answers
Q: Why subnetting in cloud?
A: Isolation and security.
Q: What is NAT Gateway?
A: Allows private subnet internet access.
Q: How do pods communicate?
A: Via flat network with Pod IPs.
Q: What is Ingress?
A: HTTP routing into Kubernetes.