**Networking Foundations for DevOps β Part 1
** Ultra-Detailed β Definitions, Why it matters, When to use, and Practical Examples
By Ashish β Learn-in-Public DevOps Journey (Week 3)
Overview
This part gives a rock-solid, practical foundation in networking for DevOps engineers. Every topic below contains:
Definition (what it is),
What it does / why it matters,
When a DevOps engineer uses it,
Practical command examples you can copyβpaste and run,
Notes / common pitfalls to watch for.
Targets: system/network troubleshooting, cloud networking, container networking, observability, CI/CD connectivity issues, and on-call remediation.
Table of Contents
Network models: OSI vs TCP/IP
Network interfaces, MAC & link layer
IP addresses: IPv4 and IPv6 (definition + examplesβ¦
**Networking Foundations for DevOps β Part 1
** Ultra-Detailed β Definitions, Why it matters, When to use, and Practical Examples
By Ashish β Learn-in-Public DevOps Journey (Week 3)
Overview
This part gives a rock-solid, practical foundation in networking for DevOps engineers. Every topic below contains:
Definition (what it is),
What it does / why it matters,
When a DevOps engineer uses it,
Practical command examples you can copyβpaste and run,
Notes / common pitfalls to watch for.
Targets: system/network troubleshooting, cloud networking, container networking, observability, CI/CD connectivity issues, and on-call remediation.
Table of Contents
Network models: OSI vs TCP/IP
Network interfaces, MAC & link layer
IP addresses: IPv4 and IPv6 (definition + examples)
Subnetting & CIDR (step-by-step + worked examples)
Routing basics & default gateway
ARP (Address Resolution Protocol)
NAT (Network Address Translation) β definition & simple examples
TCP vs UDP β ports, sockets & connection states
MTU, fragmentation and common issues
DNS fundamentals (what, how, tools)
DHCP basics (how clients get addresses)
Linux network tools & commands (ip, ss, netstat, traceroute, ping, curl, dig, nslookup) β with examples
Firewalls basics (iptables/nftables, ufw/firewalld) β examples for DevOps
Virtual networking basics (VLANs, bonding/teaming, bridges)
Container & VM networking concepts (bridge, host, macvlan, overlay)
Quick troubleshooting workflows & checklist
1 β Network Models: OSI vs TCP/IP
Definition: conceptual frameworks that describe how network communication is layered.
OSI (7 layers): Physical β Data Link β Network β Transport β Session β Presentation β Application
TCP/IP (4 layers): Link (Network Interface), Internet (IP), Transport (TCP/UDP), Application (HTTP, DNS, etc.)
What it does / why it matters: Layers help you reason: is the problem physical (cable), link (MAC), routing (IP), transport (TCP), or application (HTTP)? DevOps troubleshooting uses layer thinking to isolate faults.
When DevOps uses it: Incident triage: packet loss (link layer), unreachable IP (network layer), TCP hangs (transport), 502 errors (application).
Example (diagnostic approach):
Layer 1: check ip a, ethtool eth0 β link up/down, speed, duplex.
Layer 2: check arp -a β MAC resolution.
Layer 3: check ip route, ping β IP routing.
Layer 4: check ss -tulnp or netstat β TCP/UDP sockets.
Layer 7: curl -I https://service or check application logs.
Notes: Youβll jump between layers during incidents β practice mapping symptoms to layers.
2 β Network Interfaces, MAC & Link Layer
Definition: A network interface (NIC) is the OS representation of a physical or virtual network adapter. A MAC (Media Access Control) address is the hardware address at the link layer.
What it does: NICs transmit/receive frames; the MAC address uniquely identifies an interface on a local link.
When DevOps uses it: Identifying physical/virtual NICs, bonding multiple NICs, diagnosing cable or switch port problems.
Commands / Examples:
Show interfaces and addresses
ip link show ip a show eth0
Show MAC addresses
ip link show eth0 | grep link/ether
Get low-level link info
ethtool eth0 # (may need package install)
Notes:
Virtual interfaces (docker0, cni0, veth*) also show here.
MACs are used only inside a broadcast domain β routers do not forward MACs.
3 β IP Addresses: IPv4 & IPv6
Definition:
IPv4: 32-bit addresses shown as dotted decimal (e.g., 192.168.1.10).
IPv6: 128-bit addresses shown hex (e.g., 2001:db8::1).
What it does: Identify hosts at the network layer; routing uses IP addresses.
When DevOps uses it: Assigning static IPs, configuring cloud NICs, diagnosing reachability, setting firewall rules.
Examples:
Show IP addresses on interfaces
ip -4 addr show # IPv4 ip -6 addr show # IPv6
Add a secondary IP
sudo ip addr add 192.168.100.10/24 dev eth0
Remove
sudo ip addr del 192.168.100.10/24 dev eth0
Notes:
Use IPv6 in cloud where supported; be mindful of firewall differences.
Public vs private addresses: private ranges (RFC1918): 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16.
4 β Subnetting & CIDR (worked examples)
Definition: Subnetting divides an IP network into smaller networks. CIDR (Classless Inter-Domain Routing) uses suffix /N to denote network prefix length (e.g., /24).
What it does: Controls which hosts are in the same L3 network (subnet); determines routing and broadcast domains.
Why DevOps uses it: Planning VPC subnets, assigning service subnets, calculating IP ranges for clusters, isolating environments.
Quick rules:
/32 = 1 host (IPv4)
/31 = 2 hosts (special)
/30 = 4 addresses (2 usable)
/29 = 8 addresses (6 usable)
/24 = 256 addresses (254 usable)
Usable hosts = total addresses β network β broadcast (for IPv4)
Example 1 β /24 to /26 split (step-by-step)
Start: 192.168.1.0/24 (addresses 192.168.1.0β192.168.1.255)
Split into four /26 subnets (each has 64 addresses, 62 usable):
192.168.1.0/26 -> 192.168.1.0 - 192.168.1.63 (usable: .1 - .62) 192.168.1.64/26 -> 192.168.1.64 - 192.168.1.127 (usable: .65 - .126) 192.168.1.128/26 -> 192.168.1.128 - 192.168.1.191 192.168.1.192/26 -> 192.168.1.192 - 192.168.1.255
How to calculate binary quick trick: /26 means 26 ones in netmask: 11111111.11111111.11111111.11000000 -> 255.255.255.192 -> block size 64.
Commands to inspect subnet info:
Show routing table and connected networks
ip route show
Calculate network info (using ipcalc if installed)
ipcalc 192.168.1.10/26
or use βsipcalcβ if available
Notes:
Always reserve addresses for gateway (.1 or .254) and avoid .0/.255 as hosts in /24.
Cloud consoles often reserve first/last IPs in a subnet β check provider docs (AWS, GCP, Azure).
5 β Routing Basics & Default Gateway
Definition: Routing chooses paths packets follow between networks. A default gateway is the router an IP host sends traffic to when the destination is not on the local subnet.
What it does: Routes forward packets between subnets and to the Internet.
When DevOps uses it: Troubleshooting unreachable hosts, peering VPCs, configuring NAT gateways.
Commands / Examples:
Show IP routing table
ip route show
Typical default route output
default via 10.0.0.1 dev eth0 proto dhcp metric 100
Add a route (persistency differs by distro/cloud)
sudo ip route add 10.10.20.0/24 via 192.168.1.1 dev eth0
Delete route
sudo ip route del 10.10.20.0/24
Notes:
Route priority uses metric; lower metric preferred.
Mistyped routes can blackhole traffic β be careful when scripting route changes.
6 β ARP (Address Resolution Protocol)
Definition: ARP maps IPv4 addresses to MAC addresses on the same broadcast domain.
What it does: When Host A wants to reach 192.168.1.10 in its subnet but only knows the IP, it broadcasts an ARP request; the owner replies with its MAC.
When DevOps uses it: Local network troubleshooting (duplicate IPs, stale ARP entries), debugging NIC problems, Docker overlay issues.
Commands / Examples:
Show ARP table
ip neigh show
or (older)
arp -a
Example: ping to populate ARP
ping -c 1 192.168.1.10 ip neigh show
Delete an ARP entry (if stale)
sudo ip neigh del 192.168.1.10 dev eth0
Pitfalls:
ARP spoofing can be a security issue.
Stale ARP entries can happen with VM migration β clear table if necessary.
7 β NAT (Network Address Translation)
Definition: NAT rewrites IP addresses and/or ports of packets crossing a router β common types: SNAT (source NAT) for outbound, DNAT (destination NAT) for inbound.
What it does: Allows multiple private hosts to share a public IP (masquerading), or forwards public traffic to internal hosts (port forwarding).
When DevOps uses it: Internet egress from private subnets, exposing services behind NAT, load balancer + reverse proxy setups.
Simple Linux example (iptables):
Masquerade outbound traffic on eth0 (simplified)
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
DNAT: forward port 8080 on gateway to internal 10.0.1.10:80
sudo iptables -t nat -A PREROUTING -p tcp βdport 8080 -j DNAT βto-destination 10.0.1.10:80 sudo iptables -A FORWARD -p tcp -d 10.0.1.10 βdport 80 -j ACCEPT
Notes:
Cloud providers offer managed NAT gateways; prefer them to DIY NAT in production for reliability.
NAT breaks end-to-end IP visibility; use logging and port mapping carefully.
8 β TCP vs UDP β Ports, Sockets & Connection States
Definition:
TCP (Transmission Control Protocol): connection-oriented, reliable, ordered.
UDP (User Datagram Protocol): connectionless, lower overhead, no guarantees.
What it does: TCP for HTTP/HTTPS, SSH, database connections; UDP for DNS, syslog, some streaming.
When DevOps uses it: Choose protocol suitable for service; troubleshoot socket states (SYN, ESTABLISHED, TIME_WAIT).
Commands / Examples:
Show listening sockets
ss -tuln # t: tcp, u: udp, l: listening, n: numeric
Show connections
ss -tnp # active tcp connections with process info
Sample output interpretation:
LISTEN 0 128 0.0.0.0:22 0.0.0.0:* users:(("sshd",pid=1234))
Common socket states to know:
LISTEN β waiting for incoming connections
SYN_SENT / SYN_RECV β connection handshake
ESTABLISHED β active connection
TIME_WAIT β waiting to ensure remote side received final ACK (normal after close)
Notes:
Excessive TIME_WAIT may indicate short-lived connections; tune tcp_tw_reuse with caution.
UDP is stateless β troubleshooting needs packet captures (tcpdump).
9 β MTU, Fragmentation & Common Issues
Definition: MTU (Maximum Transmission Unit) is the largest packet size that can be transmitted without fragmentation. Fragmentation occurs when a packet exceeds MTU and is split.
What it does: Correct MTU avoids fragmentation; mismatched MTU causes connectivity issues, especially with VPNs and tunnels.
When DevOps uses it: Troubleshooting slow connections, VPNs, overlay networks (VXLAN/Weave/Flannel), Docker overlay MTU issues.
Commands / Examples:
Show MTU
ip link show eth0
Ping with specific packet size to test MTU (Linux)
ping -M do -s 1472 8.8.8.8 # 1472 + 28 = 1500 (ICMP header = 28)
Change MTU (temporary)
sudo ip link set dev eth0 mtu 1400
Notes:
Encapsulation (GRE/VXLAN) reduces usable MTU; reduce interface MTU accordingly (e.g., 1450).
ICMP "Fragmentation needed" messages must reach the source for Path MTU Discovery to work β blocked ICMP breaks PMTUD.
10 β DNS Fundamentals
Definition: DNS maps human names (example.com) to IP addresses (A/AAAA records) and other records (CNAME, MX, TXT).
What it does: Allows services to be addressed by names rather than IPs; critical for service discovery.
When DevOps uses it: Configure app domains, validate DNS propagation, troubleshoot name resolution.
Commands / Examples:
Query A record
dig +short example.com A
Full trace
dig +trace example.com
nslookup interactive
nslookup
server 8.8.8.8 example.com
check TXT or MX
dig example.com TXT dig example.com MX
Common issues:
Misconfigured TTL causes stale records.
Missing records or wrong zone files cause failures.
Split-horizon DNS (different answers internally vs externally) can confuse troubleshooting.
11 β DHCP Basics
Definition: DHCP dynamically assigns IP addresses and network configuration (gateway, DNS) to clients.
What it does: Simplifies host provisioning and IP management.
When DevOps uses it: Cloud VMs often use DHCP; on-prem hosts and containers may use DHCP; know how DHCP impacts bootstrapping.
Commands / Examples:
Check lease file (example for dhclient)
cat /var/lib/dhcp/dhclient.leases
Force renew (Linux)
sudo dhclient -r eth0 sudo dhclient eth0
Notes:
In cloud environments, metadata services provide more than DHCP (e.g., user data).
Static IPs are preferable for critical services.
12 β Linux Network Tools & Commands (practical)
This is your daily toolkit β copy these.
ip (modern replacement for ifconfig/route) ip a # show addresses ip link show # show interfaces & state ip route show # routing table ip neigh show # ARP table
ss / netstat ss -tuln # listening ports ss -tnp # tcp connections + processes netstat -tulnp # older systems
ping / traceroute / mtr ping -c 4 google.com traceroute google.com mtr google.com # real-time traceroute+ping (interactive)
curl / wget curl -I https://example.com # show headers curl -sS http://api/endpoint | jq β.β wget https://example.com/file
DNS tools dig +short example.com nslookup example.com 8.8.8.8
Packet capture sudo tcpdump -i eth0 port 80 -w capture.pcap
view live (text)
sudo tcpdump -i eth0 -n -vv
Inspect routing to a host ip route get 8.8.8.8
L4 testing
test TCP connect to port
nc -vz 10.0.0.5 443 # (netcat)
test UDP (less reliable)
nc -vu 10.0.0.5 123
Notes:
Use sudo for privileged operations.
tcpdump outputs can be large β filter by host/port.
13 β Firewalls: iptables, nftables, ufw, firewalld
Definition: Firewalls enforce policies for traffic filtering (packet/connection level).
What it does: Allow/deny traffic based on IP, port, interface, state.
When DevOps uses it: Control service exposure, secure nodes, implement port-forwarding.
Simple examples (iptables):
Allow incoming SSH
sudo iptables -A INPUT -p tcp βdport 22 -m conntrack βctstate NEW,ESTABLISHED -j ACCEPT
Allow established/related
sudo iptables -A INPUT -m conntrack βctstate ESTABLISHED,RELATED -j ACCEPT
Drop everything else
sudo iptables -P INPUT DROP
nftables (modern):
sudo nft list ruleset
add rules via nft syntax (recommended to read docs)
UFW (Ubuntu simple firewall):
sudo ufw allow 22/tcp sudo ufw enable sudo ufw status
firewalld (RHEL/CentOS):
sudo firewall-cmd βadd-service=http βpermanent sudo firewall-cmd βreload
Notes:
Cloud security groups are separate (AWS/GCP/Azure) β ensure both cloud and host firewall rules align.
Incorrect firewall rules can lock you out of remote servers β always keep console access or temporary rules.
14 β Virtual Networking: VLANs, Bonding/Teaming, Bridges
Definition & Use:
VLAN (802.1Q): logical segmentation of a physical network β multiple L2 networks on same cable.
Bonding / Teaming: combine multiple NICs for redundancy or throughput aggregation.
Bridge: L2 device in Linux that forwards frames between interfaces β used for VM/container networking.
When DevOps uses it: Data center network segmentation, high availability NIC setup, container networks.
Examples:
create VLAN (example)
sudo ip link add link eth0 name eth0.100 type vlan id 100 sudo ip addr add 192.168.100.10/24 dev eth0.100 sudo ip link set dev eth0.100 up
show bridges
bridge link
create bridge (for VMs/containers)
sudo ip link add name br0 type bridge sudo ip link set dev br0 up sudo ip link set dev eth0 master br0
Notes:
Bonding modes matter (active-backup vs LACP) β coordinate with switch config.
Bridges are the basis for docker0 and many CNI plugins.
15 β Container & VM Networking (core concepts)
Definition: Containers and VMs use virtual networks β bridge, host, macvlan, overlay.
What it does:
bridge: containers get private NIC on host bridge (NAT to outside).
host: container uses host network namespace (no isolation).
macvlan: container appears as separate L2 device on network.
overlay (VXLAN/Weave): connect containers across hosts (used by Docker Swarm, older Kube CNI plugins).
Why DevOps cares: Troubleshooting pod-to-pod, node-to-node connectivity, Service/Ingress behavior, MTU issues on overlays.
Quick inspect examples:
list docker networks
docker network ls docker network inspect bridge
check container IP
docker inspect -f β{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}β container_name
Kubernetes pointers (preview):
Pods have network namespace and virtual eth0; kubectl exec + ip a inside pod helps debug.
kubectl get svc, kubectl get endpoints, and kubectl describe svc are essential.
Notes:
Overlay networks often need reduced MTU due to encapsulation.
DNS inside containers: check /etc/resolv.conf in pod/container.
16 β Quick Troubleshooting Workflows & Checklist
When a service or host is unreachable, follow a layered checklist:
Is the interface up?
ip link show eth0 ip a show eth0
Does host have an IP & route to destination?
ip addr show ip route ip route get
Can you resolve DNS (if name used)?
dig +short service.example.com nslookup service.example.com
Is the host reachable (ICMP)?
ping -c 4
If ping fails: try traceroute / mtr.
Is the port listening on the server?
ss -tuln | grep :80
Are firewall or security groups blocking?
Check iptables/nft/ufw/firewalld and cloud security groups.
Is NAT/Load Balancer translating correctly?
Review NAT/DNAT rules, ELB/NLB target health.
Packet level check
sudo tcpdump -i eth0 host and port
Check ARP / local broadcast domain
ip neigh show arp -a
If in containers/k8s: check CNI plugin logs, node routes, kube-proxy status.
Bonus: Small Useful Scripts / One-Liners
Count open connections to a host:
ss -tn state established β( dport = :443 or sport = :443 )β | wc -l
Show top talkers by bytes (netstat variant):
sudo ss -tanp | awk β{print $5}β | cut -d: -f1 | sort | uniq -c | sort -nr | head
Check for duplicate IPs (ARP)
arp -a | awk β{print $2}β | sort | uniq -d
Networking for DevOps β Part 2
DNS β’ Routing β’ NAT β’ Tools β’ Firewalls β’ Cloud Networking (With Definitions, Deep Explanations & Real DevOps Examples) By Ashish β Learn-in-Public DevOps Journey (Week 3)
π Table of Contents
DNS β Definition + Deep Explanation + Examples 1.
Hostnames, resolv.conf & Name Resolution (Definitions + Examples) 1.
Routing β Definition, Linux Routing, Cloud Routing 1.
NAT β Definition + SNAT + DNAT + Masquerade 1.
Firewalls β Definition + Linux + Cloud Firewalls 1.
Networking Tools β Definitions + How They Work 1.
Real DevOps Debugging Case Studies 1.
Cloud Networking Summary (AWS / Azure / GCP)
1οΈβ£ DNS β Definition, Working & Practical DevOps Usage π Definition: What is DNS?
DNS (Domain Name System) is a global distributed system that translates human-readable names into IP addresses.
Example:
www.google.com β 142.250.70.14
Without DNS, you would have to type IPs for every siteβimpossible at scale.
π Why DNS Matters for DevOps?
Because every cloud service, microservice, Kubernetes service, API, Git repo, load balancer, and CI/CD tool depends on DNS.
If DNS fails:
Apps fail
API calls fail
Load balancer health checks fail
Containers canβt resolve internal services
CI/CD webhooks break
πΉ How DNS Works (Step-by-Step + Diagram) [Client] β DNS Resolver β Root Servers β TLD Servers β Authoritative DNS β Final IP returned
Try checking a domain:
dig google.com
πΉ Important DNS Records (with Definitions & Examples) Record Definition Example A Maps hostname β IPv4 api.app.com β 54.21.11.9 AAAA Maps hostname β IPv6 app β 2607:f8b0... CNAME Alias pointing to another domain www β app.com MX Mail routing Gmail mail servers NS Nameserver for domain ns1.cloudflare.com TXT Text records (SPF, DKIM, verification) google-verification SRV Service discovery _sip._tcp.example.com π₯ Real DevOps Example β ALB + CNAME
AWS ALB hostname:
myapp-alb-988.ap-south-1.elb.amazonaws.com
DNS record you create:
app.example.com β ALB CNAME above
If ALB changes, your app still works.
πΉ DNS Tools (Definitions + Examples) β dig β Definition: DNS query tool
Examples:
dig linkedin.com dig +short linkedin.com dig +trace google.com # full DNS chain
β nslookup β Definition: legacy DNS lookup tool nslookup api.service.com
β host β Definition: simple reverse & forward DNS lookup host google.com
2οΈβ£ Hostnames, resolv.conf & Name Resolution π Definition: Hostname
A hostname is the human-readable name of a system in a network.
Check:
hostname hostnamectl
π Definition: /etc/hosts
Local static DNS mapping file.
Example entry:
10.0.1.40 backend.internal
Now you can run:
curl http://backend.internal:8080
π Definition: resolv.conf
File that tells Linux which DNS servers to use.
Check:
cat /etc/resolv.conf
Example:
nameserver 8.8.8.8 nameserver 1.1.1.1
If this file is wrong β DNS will fail.
3οΈβ£ Routing β Definitions + Linux Routing + Cloud Routing π Definition: Routing
Routing is the process of selecting which path a packet should take to reach its destination.
Every Linux system has a routing table.
β View routing table: ip route
Example:
default via 192.168.1.1 dev eth0 10.0.0.0/24 dev eth0 proto kernel
Definition: Default Route The path used when no specific route exists.
β Add route manually (used in hybrid cloud) sudo ip route add 172.16.0.0/16 via 10.0.0.1
π₯ Cloud Routing Example (AWS VPC) 10.0.0.0/16 local 0.0.0.0/0 igw-abc123 # internet access 10.0.2.0/24 nat-xyz987 # private β internet
Definitions:
IGW: Internet Gateway
NAT: Outbound internet for private subnets
4οΈβ£ NAT β Definitions + SNAT + DNAT + Masquerade π Definition: NAT (Network Address Translation)
Technique to modify IP addresses in packets.
Used for:
internet access
load balancers
proxies
Kubernetes
home routers
πΉ SNAT β Source NAT
Definition: Change source IP before sending to destination.
Used by:
AWS NAT Gateway
GCP Cloud NAT
Example:
Private: 10.0.1.10 β Public: 44.11.22.33
πΉ DNAT β Destination NAT
Definition: Change destination IP of incoming packets.
Example:
Public 44.22.13.7:443 β Private 10.0.1.25:443
Used by:
Reverse proxies
Load balancers
Ingress controllers
πΉ Masquerading
Definition: Dynamic SNAT on Linux.
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
5οΈβ£ Firewalls β Definitions + Linux + Cloud π Definition: Firewall
A firewall controls which traffic is allowed or blocked.
π₯ Linux Firewall Tools β iptables β packet-level filtering sudo iptables -L -n
β ufw β simple firewall sudo ufw allow 8080
π₯ Cloud Firewalls AWS
Security Groups (SG): Stateful
NACLs: Stateless
Azure
NSG
GCP
VPC firewall rules
Example rule:
Allow inbound TCP 22 from 103.94.x.x
6οΈβ£ Networking Tools β Definitions + Practical Examples πΈ ping
Definition: ICMP echo tool for basic reachability.
ping google.com
Checks:
DNS
ICMP
packet loss
latency
πΈ traceroute
Definition: Shows path packets take.
traceroute youtube.com
πΈ curl
Definition: HTTP client to test APIs and servers.
curl -I https://example.com curl -v http://backend:8080/health
πΈ wget
Definition: network downloader
wget https://example.com/file.zip
πΈ ss
Definition: Shows open ports & sockets (modern netstat).
ss -tulnp
πΈ ip
Definition: Modern replacement for ifconfig/route.
ip a ip link ip route
πΈ arp
Definition: Maps IP β MAC on local network.
arp -a
7οΈβ£ Real DevOps Debugging Scenarios β App cannot reach database
Steps:
1οΈβ£ DNS
nslookup db.internal
2οΈβ£ Connectivity
ping db.internal
3οΈβ£ Port
ss -tulnp | grep 5432
4οΈβ£ Firewall Check SG/NSG rules.
β Port already in use ss -tulnp | grep 8080 kill -9
β Pod cannot reach internet
Check node DNS:
cat /etc/resolv.conf
Check routing:
ip route
8οΈβ£ Cloud Networking Summary AWS
VPC
Subnets
Route Tables
IGW
NAT Gateway
Security Groups
NACLs
ALB/NLB
PrivateLink / VPC Endpoints
Azure
VNet
Subnets
NSG
UDR
Application Gateway
Load Balancer
GCP
VPC
Global Subnets
Firewall Rules
Cloud NAT
Cloud Router
**Networking for DevOps β Part 3
** Load Balancers, VPC Design, Subnets, Kubernetes Networking (Ultra-Detailed)
By Ashish β Learn-in-Public DevOps Journey (Week 3)
Overview
This part covers the backbone of modern cloud networking:
Load Balancers (L4 vs L7)
VPCs (AWS/GCP/Azure)
Subnet types (Public, Private, Database, DMZ)
Routing tables, NAT gateways, Internet gateways
Kubernetes cluster networking (Pod CIDR, Service CIDR, CNI, kube-proxy)
Ingress Controllers (Nginx, Traefik, AWS ALB)
NodePort, ClusterIP, LoadBalancer β everything explained simply
Real diagrams + real DevOps troubleshooting examples
This is one of the most critical parts for DevOps engineersβyouβll use this knowledge daily in cloud, containers, and microservices.
π Table of Contents
Load Balancers
Definition
L4 vs L7
Health checks
Sticky sessions
SSL termination
Example in AWS / GCP / Azure
VPC Design for DevOps
What is a VPC?
CIDR selection
Public, private, database subnets
Internet Gateway, NAT Gateway
Route tables
Network ACLs vs Security Groups
Subnets β Deep Dive
Definition
Subnet CIDR design
Public vs Private vs Isolated
Best practices
Kubernetes Networking
Pod CIDR
Service CIDR
CNI (Calico, Flannel, Weave, Cilium)
kube-proxy
Types of Services
ClusterIP
NodePort
LoadBalancer
ExternalName
Ingress
Network Policies
Real DevOps Scenarios
Troubleshooting Checklist
PART 3 β Detailed Content
- Load Balancers (LB) β Foundation of Modern Distributed Systems Definition
A Load Balancer distributes incoming traffic across multiple backend servers to ensure:
High availability
Fault tolerance
Scalability
Better performance
Used heavily in microservices, cloud apps, and Kubernetes.
1.1 L4 Load Balancer (Transport Layer Load Balancer)
Definition: Operates at Layer 4 (TCP/UDP) in the OSI model. It routes traffic only based on IP + Port.
What it does: It doesnβt inspect HTTP headers or URLs β only TCP/UDP ports.
Use Cases:
Database load balancing
TCP services
Game servers
High-speed low-latency systems
Examples:
AWS Network Load Balancer (NLB)
GCP Network TCP Load Balancer
Linux ipvs
Example β AWS NLB:
SSL termination NOT done here
Super low latency
Best for millions of requests per second
1.2 L7 Load Balancer (Application Layer Load Balancer)
Definition: Operates at Layer 7 (HTTP/HTTPS). It routes traffic by:
Path
URL
Cookies
Host header
HTTP method
What it does: Understands the HTTP protocol completely.
Use Cases:
Microservices (ex: /api β service A)
Routing based on URL path
Blue/green deployments
Canary releases
Examples:
AWS ALB
GCP HTTP(S) Load Balancer
Nginx / Envoy / HAProxy
Example:
/ -> frontend /api -> backend /auth -> auth-service
1.3 Health Checks
Definition: Periodic tests by LB to check if backend is healthy.
Types:
TCP health check
HTTP health check
Command-based (K8s probes)
Example (HTTP check):
GET /health 200 OK β healthy 500 / timeout β unhealthy
1.4 Sticky Sessions (Session Affinity)
Definition: A feature where LB routes same user to same backend server.
Used for:
Stateful applications
Legacy monoliths
Disabled in modern microservices.
1.5 SSL Termination
Definition: LB decrypts HTTPS β HTTP between LB & backend.
Benefits:
Offload CPU
Central certificate management
Simpler backend setup
- VPC Design for DevOps (Cloud Networking Core) Definition β VPC
A Virtual Private Cloud (VPC) is an isolated virtual network you create inside a cloud provider.
Equivalent to:
Your own data center
Your own IP range
Your own routing, firewall, NAT, internet gateway
2.1 How VPC Works (Simplified Diagram) +ββββββ VPC (10.0.0.0/16) ββββββ+ | | | Public Subnet Private Subnet | | 10.0.1.0/24 10.0.2.0/24 | | | | [ EC2 Web ] <β> IGW [ EC2 App ] <β> NAT GW | | | +βββββββββββββββββββ+
2.2 VPC Components (Definitions + Examples) β CIDR Block
IP range of the VPC Example:
10.0.0.0/16 β 65,536 IPs
β Subnets
Divide VPC into smaller networks.
β Route Table
Decides where traffic flows.
Example:
0.0.0.0/0 β igw-1234 (public) 0.0.0.0/0 β nat-5678 (private)
β Internet Gateway (IGW)
Allows public internet access.
β NAT Gateway
Allows outbound internet traffic from private subnets.
β Security Groups
Stateful firewalls.
β NACLs
Stateless subnet-level firewalls.
- Subnets β Deep Explanation Definition β Subnet
A subnet is a smaller network inside a VPC created from a larger CIDR.
Subnet Types
- Public Subnet
Has route to internet via IGW Used for:
ALB
Bastion host
Public-facing applications
- Private Subnet
Outbound only via NAT gateway Used for:
Application servers
Containers
Microservices
- Database Subnet
Isolated, no internet Used for:
RDS
MongoDB
Redis
Elasticsearch
- DMZ Subnet
Used in highly secure architectures.
Subnet Allocation Example (AWS Best Practice) Purpose Subnet Example CIDR Public 2 subnets 10.0.1.0/24, 10.0.2.0/24 Private 2 subnets 10.0.3.0/24, 10.0.4.0/24 DB 2 subnets 10.0.5.0/24, 10.0.6.0/24
- Kubernetes Networking (The Heart of Cloud-Native)
Kubernetes networking is where 90% DevOps engineers struggle.
Letβs make it simple.
4.1 Pod Networking (Pod CIDR) Definition
Each pod gets its own IP address.
Requirement
Every pod must communicate with every other pod without NAT.
Example Pod CIDR 10.244.0.0/16 β Flannel 192.168.0.0/16 β Calico
Important Command: kubectl exec -it pod β ip a
4.2 CNI β Container Network Interface
Definition: Plugin responsible for creating pod networks.
Popular CNIs:
Flannel (simple, overlay)
Calico (L3 routing + Network Policies)
Weave
Cilium (eBPF β fastest)
4.3 Service Networking (Service CIDR)
Definition: Service abstracts pods behind stable virtual IPs.
Example CIDR:
10.96.0.0/12 (default in kubeadm)
4.4 kube-proxy
What it does: Implements service load balancing via:
iptables (older)
ipvs (faster, production-grade)
4.5 Kubernetes Service Types
- ClusterIP (default)
Only accessible inside the cluster.
Example:
type: ClusterIP
- NodePort
Exposes service on each nodeβs port (30000β32767).
Example:
type: NodePort
- LoadBalancer
Cloud LB creates automatically.
Used in AWS/GCP/Azure.
- ExternalName
DNS CNAME mapping.
4.6 Ingress Controller
Definition: L7 HTTP reverse proxy inside Kubernetes.
Used for:
Routing /api /auth
SSL termination
Multi-domain hosting
Examples:
NGINX Ingress
Traefik
HAProxy
AWS ALB Ingress Controller
4.7 Network Policies
Definition: Firewall for pods.
Example:
Allow only app β db Deny everything else
- Real DevOps Scenarios Scenario 1 β Pod canβt reach Internet
Checklist:
CNI β Node routing β NAT Gateway β Route Table β IGW
Scenario 2 β App behind ALB returning 502
Possible:
Target group health check failing
Wrong security group
Timeout mismatch
Wrong VPC subnet
Scenario 3 β Microservices unable to talk
Check:
Network policy Service CIDR DNS resolution Pod-to-pod communication
- Troubleshooting Checklist Basic:
kubectl get svc
kubectl get ep
kubectl describe svc
kubectl exec -it pod β curl :
ss -tulnp
ip route
LB Troubleshooting:
Check target health
Check SG/NACLs
Remove stickiness
Compare timeout values
VPC Troubleshooting:
Validate route tables
Confirm NATGW/IGW attachment
Check overlapping CIDRs
**Networking for DevOps β Part 4
** Firewalls, Security Groups, NACLs & Zero-Trust (Ultra Detailed, Beginner β Advanced)
By Ashish β Learn-in-Public DevOps Journey (Week 3)
π Overview
This part explains the security backbone of cloud networking:
What is a firewall? (simple definition + real examples)
Cloud firewalls vs Linux firewalls
Security Groups (AWS/GCP/Azure) & why theyβre stateful
Network ACLs (NACLs) & why theyβre stateless
SG vs NACL β clear comparison
Zero-Trust Networks
Bastion Hosts & Jumpboxes
Practical DevOps scenarios
Troubleshooting rules that break production
This section is designed so a complete beginner can understand, AND an advanced DevOps engineer can refine their mental model.
π Table of Contents
What is a Firewall? (Definition + Types + Examples)
Linux Firewalls
iptables
nftables
ufw
Cloud Security Groups (AWS/GCP/Azure)
Definition
How they work
Inbound/Outbound rules
Real examples
Network ACLs (NACLs)
Definition
Allow/Deny rules
Stateless behavior
SG vs NACL (Simple Comparison)
Zero-Trust Networking
Bastion Hosts / Jump Servers
Real DevOps Scenarios
Troubleshooting Security Issues Checklist
PART 4 β Full Breakdown
- What is a Firewall? Definition:
A firewall is a security system that filters inbound and outbound traffic based on predefined rules.
Simple explanation:
A firewall decides who is allowed in, who can go out, and which ports/protocols are allowed.
1.1 Types of Firewalls Type Meaning Example Network Firewall Protects networks AWS NACLs, Cisco ASA Host Firewall Protects a single machine UFW, iptables Application Firewall Filters HTTP apps WAF, Cloudflare Cloud Firewalls Built into cloud providers Security Groups 1.2 Firewall Example (Real Life)
Imagine a building:
Security Guard = Firewall
ID Check = Authentication
Permission Check = Rules
Servers work the same way.
- Linux Firewalls (Local Machine Level)
These run inside the server itself.
2.1 iptables (Legacy but widely used)
Definition: iptables is a Linux firewall tool that filters packets using chains and rules.
Example β Allow SSH iptables -A INPUT -p tcp βdport 22 -j ACCEPT
Block everything else: iptables -A INPUT -j DROP
View rules: iptables -L -n
Used heavily in:
Bare-metal servers
Older Kubernetes nodes
Legacy deployments
2.2 nftables (Modern replacement for iptables)
Definition: A newer, faster firewall framework that replaces iptables.
View rules:
nft list ruleset
2.3 UFW (Uncomplicated Firewall) β Ubuntuβs Easy Firewall
Enable:
sudo ufw enable
Allow SSH:
sudo ufw allow 22
Allow NGINX:
sudo ufw allow βNginx Fullβ
Disable:
sudo ufw disable
Used in Ubuntu servers for quick rule setup.
- Cloud Security Groups (SGs) Definition (VERY IMPORTANT):
A Security Group (SG) is a stateful firewall attached to cloud resources like:
EC2 instances
Load Balancers
RDS databases
EKS nodes
Azure VMs
GCP VMs
Stateful = automatically allows return traffic
If inbound rule allows port 80:
Response traffic automatically allowed outbound
No need to create reverse rule
3.1 AWS Security Group Example Allow inbound HTTP & SSH Inbound: 80/tcp β 0.0.0.0/0
22/tcp β My-IP
Outbound (default allow) 0.0.0.0/0
3.2 Azure Network Security Group (NSG)
Same concept as AWS SGs, different naming.
3.3 GCP Firewall Rules
GCP uses project-level firewall rules, not instance-level.
3.4 Security Group Use Cases β Allow ALB β EC2 SG-ALB β SG-EC2: 80
β Allow App β Database SG-APP β SG-DB: 3306
β Allow Bastion β Private EC2 SG-BASTION β SG-PRIVATE: 22
β Block the world, allow private communication 10.0.0.0/16 only
- Network ACLs (NACLs) β Subnet Level Firewall Definition:
A NACL is a stateless firewall that controls traffic at the subnet level.
Stateless = NO automatic return traffic
If you allow inbound 80: β‘ You must manually allow outbound 80.
4.1 NACL Example Allow HTTP: Inbound: 80 ALLOW
Outbound: 80 ALLOW
Deny everything else: Inbound:
- DENY Outbound:
- DENY
Used for:
Extra protection
Secure subnets
Blocking malicious CIDRs
- Security Group vs NACL (Simple Chart) Feature SG NACL Level Instance Subnet Stateful β Yes β No Default All deny All allow Best use App-level control Subnet-level restriction Supports deny? No Yes Complexity Simple More complex
Rule:
Use Security Groups for 90% of cases. Use NACLs only when you must deny CIDRs or need subnet-wide rules.
- Zero-Trust Networking β Cloud Security Standard Definition
Zero-Trust means:
Trust no one, not even internal networks
Every connection must be authenticated
Least privilege access always
No implicit trust even inside VPC
Real applications:
AWS IAM roles
Pod identity in Kubernetes
Service mesh (Istio, Linkerd)
mTLS (mutual TLS)
Zero trust is the future of cloud security.
- Bastion Hosts (Jump Servers) Definition:
A server in public subnet used ONLY to SSH into private subnet servers.
Diagram:
Internet β Bastion Host β Private EC2
Why?
Secure 22/tcp access
No need to expose private instances to public
Can restrict SSH to your IP only
- Real DevOps Scenarios β Scenario 1 β App not accessible on port 8080
Troubleshooting:
SG inbound 8080 open?
SG outbound allowed?
NACL inbound/outbound both allowed?
App actually listening? (ss -tulnp)
Route table correct?
Service behind LB passing health checks?
β Scenario 2 β RDS cannot be accessed from EC2
Check:
SG-EC2 β SG-RDS : 3306 Same VPC? Correct subnet routing? No NACL deny rule?
β Scenario 3 β Kubernetes LoadBalancer stuck in βPendingβ
Possible issues:
No public subnet tagged
Firewall blocking 30000β32767
Missing cloud controller
NACL blocking ports
β Scenario 4 β Private subnet EC2 has no internet
Check:
NAT gateway exists
Route table has 0.0.0.0/0 β NAT
NACL outbound allow
SG outbound allow
- Troubleshooting Checklist π For Security Group Issues
Check explicit inbound allow
Check outbound (rare but important)
Check instance-level firewall (iptables)
Check if LB β target mapping exists
π For NACL Issues
Must allow BOTH ways
Look for DENY rules
Confirm correct subnet association
π For Linux host issues sudo ss -tulnp sudo ufw status sudo iptables -L -n
π For Kubernetes issues kubectl describe svc kubectl describe ingress kubectl get endpoints
**Networking for DevOps β Part 5
** Monitoring, Observability & Packet Captures (tcpdump, ss, iperf, Wireshark)
By Ashish β Learn-in-Public DevOps Journey (Week 3)
π Overview
In modern DevOps, βnetworkingβ isnβt just configuring subnets and IPs β itβs being able to observe, measure, debug, and trace whatβs happening inside the network.
This chapter covers the real debugging tools used in Cloud + Linux + Containers + Kubernetes + Production SRE environments:
You will learn:
What observability means in networking
Key metrics: latency, throughput, jitter, RTT, packet loss
Network debugging tools:
ping, traceroute, mtr
ss, netstat
iftop, nload, iperf3
Packet capture tools (tcpdump, tshark, Wireshark)
Deep dive into tcpdump filters with examples
Capturing packets inside containers (Docker/K8s)
Real DevOps troubleshooting scenarios
When to use which tool (flow diagram)
This is a long chapter β but it will make you significantly better than an average DevOps engineer.
π Table of Contents
What is Observability in Networking?
Key Network Metrics You Must Understand
Basic Network Monitoring Tools
Real-Time Bandwidth Monitoring Tools
Connection & Socket Monitoring
Packet Captures with tcpdump
Wireshark & tshark (GUI + CLI packet analysis)
Packet Captures Inside Docker & Kubernetes
Real DevOps Troubleshooting Case Studies
Tool Selection Cheat-Sheet
- What is Observability in Networking? Definition:
Network observability is the ability to see, measure, and understand network behavior in real-time and retroactively.
Why DevOps needs it:
Diagnose slow applications
Debug API failures
Fix DNS issues
Check load balancer routing
Investigate packet drops
Ensure firewall/NACL rules arenβt blocking traffic
Confirm microservices are communicating properly
Observability tools fall into three categories:
Category Tools Purpose Monitoring ping, traceroute, netstat, ss Check status & health Metrics iftop, nload, iperf3 Bandwidth, throughput Packet Capture tcpdump, Wireshark Deep inspection
- Key Network Metrics for DevOps/SRE
These are the fundamentals behind all networking analysis.
2.1 Latency
Time taken for a packet to reach the destination.
Measured using:
ping google.com
2.2 Packet Loss
% of packets that never reach the server.
In mtr:
Loss% column
2.3 Jitter
Variation in latency β extremely important for VoIP, video, real-time apps.
2.4 Throughput
Amount of data transferred per second.
Measured using:
iperf3 -s iperf3 -c server-ip
2.5 Bandwidth
Maximum theoretical data rate of a network link.
2.6 RTT (Round Trip Time)
Time taken for a request to go and return.
Shown in ping:
rtt min/avg/max/mdev
- Basic Network Monitoring Tools (Every DevOps Must Know) 3.1 ping β Latency + Reachability Test Definition:
Sends ICMP echo requests to test connection and latency.
Example:
ping google.com
Uses:
DNS test
Reachability test
Basic latency check
3.2 traceroute β Path Trace Definition:
Shows each hop between you and the target.
traceroute google.com
3.3 mtr β ping + traceroute combined (best tool) mtr google.com
Shows:
Packet loss
Latency per hop
Real-time route changes
Most useful tool for network debugging.
- Real-Time Bandwidth Monitoring Tools 4.1 iftop β Real-time bandwidth βtopβ sudo iftop
Shows:
Live traffic between IPs
Highest bandwidth users
4.2 nload β Live incoming/outgoing traffic graph nload
Great for:
Debugging sudden spikes
Monitoring server saturation
4.3 iperf3 β Network speed testing
Server:
iperf3 -s
Client:
iperf3 -c
Useful for:
Testing between cloud regions
Benchmarking VPNs
Validating network throughput
- Connection & Socket Monitoring 5.1 ss β Modern socket investigation tool
Definition: Replaces netstat, faster & more detailed.
Show listening ports:
ss -tulnp
Find process using port:
ss -tulnp | grep 8080
5.2 netstat β Legacy tool netstat -tulnp
Still used in many old systems.
- Packet Captures with tcpdump (MOST IMPORTANT)
Packet capture = the only way to see exactly what is happening on the wire.
Definition:
tcpdump captures and displays packet-level network traffic.
6.1 Basic Capture
Capture all traffic:
sudo tcpdump -i eth0
Write to file:
sudo tcpdump -i eth0 -w capture.pcap
Stop after 100 packets:
sudo tcpdump -c 100
6.2 Filters (Critical for DevOps) Capture only HTTP traffic: sudo tcpdump -i eth0 port 80
Capture only SSL/TLS (HTTPS): sudo tcpdump port 443
Capture specific IP: sudo tcpdump host 10.0.1.15
Capture traffic between two hosts: sudo tcpdump src 10.0.1.15 and dst 10.0.1.20
Capture DNS traffic: sudo tcpdump port 53
Capture only SYN packets (TCP handshake): tcpdump βtcp[tcpflags] & tcp-syn != 0β
6.3 Analyse the pcap file in Wireshark
Open file:
File β Open β capture.pcap
Wireshark allows inspection of:
HTTP requests
TLS handshakes
DNS queries
Retransmissions
Packet loss
TCP window issues
- Wireshark & tshark (GUI & CLI) 7.1 Wireshark (GUI)
Used for:
Deep packet inspection
Identifying slow backend services
Seeing encrypted vs unencrypted traffic
Troubleshooting TLS failures
7.2 tshark (CLI version of Wireshark)
Capture DNS traffic:
tshark -f "port 53"
List available interfaces:
tshark -D
Filter HTTP requests:
tshark -Y http
- Packet Captures in Docker & Kubernetes 8.1 Capture packets in a Docker container
Find container PID:
pid=$(docker inspect -f β{{.State.Pid}}β container-name)
Capture:
sudo nsenter -t $pid -n tcpdump -i eth0 -w container.pcap
8.2 Capture packets in Kubernetes Pod
Get pod:
kubectl get po -A
Exec tcpdump:
kubectl exec -it pod-name β tcpdump -i eth0 -w pod.pcap
- Real DevOps Troubleshooting Case Studies Case 1: Application is slow
Tools:
mtr ss -tulnp iftop
Check:
Packet loss?
High bandwidth consumption?
Port conflict?
Case 2: DNS Issues
Tools:
tcpdump port 53 dig +trace domain.com
Symptoms:
Slow API response
Curl fails randomly
Case 3: API unreachable from Kubernetes
Tools:
kubectl exec β curl tcpdump from node ss -tulnp
Look for:
Firewall rules
Service endpoints missing
Wrong DNS names
Case 4: Load Balancer Health Checks Failing
Tools:
tcpdump port 80 curl -I localhost ss -tulnp
- Tool Selection Cheat-Sheet Problem Tool Slow network mtr, iftop Port blocked ss, tcpdump API unreachable curl, tcpdump DNS issues dig, tcpdump Bandwidth high iftop, nload TCP handshake failing tcpdump Kubernetes network down kubectl exec, tcpdump
**Networking for DevOps β Part 6
SDLC + DevOps Architecture (Ultra-Detailed Week 3 Final Notes)**
By Ashish β Learn-in-Public DevOps Journey
π Why This Part Matters
As a DevOps engineer, your entire job sits between:
SDLC (Software Development Life Cycle)
β The complete process of building software from idea β production β maintenance.
DevOps Architecture
β The tools, pipelines, environments, networks, and automation that turn SDLC into real deployments.
To build, deploy, scale, troubleshoot, and monitor modern cloud systems, you must deeply understand:
What happens in each SDLC stage
Where DevOps fits
How CI/CD automates the flow
How networking connects everything
How cloud-native architecture changes SDLC
How security integrates (DevSecOps)
How SRE extends DevOps in production
This part connects everything from Week 1 (Linux), Week 2 (Shell Scripting), and Week 3 (Networking) into one complete architecture understanding.
π Table of Contents
What is SDLC β DevOps Perspective
Waterfall SDLC vs DevOps SDLC
Detailed Breakdown of Each SDLC Phase
DevOps Architecture: Fully Explained
CI/CD Pipeline Architecture (Deep Dive)
Multi-Environment Flow (Dev β Test β Stage β Prod)
GitOps, IaC & Cloud-Native DevOps
DevSecOps (Security in Every Stage)
SRE vs DevOps
End-to-End DevOps Architecture Diagram
Real-World DevOps Pipeline Example
Week 3 Summary + Completion
- SDLC (Software Development Life Cycle) β DevOps View π Definition
SDLC is the complete roadmap for building and maintaining software. It defines how software is:
Planned
Developed
Tested
Deployed
Released
Maintained
Traditional SDLC was designed for older systems where deployments happened once every few months.
β οΈ But DevOps changed SDLC completely.
Today companies like Netflix, Amazon, Meta ship hundreds of deployments per day β possible only because SDLC evolved through DevOps.
- Classical SDLC vs DevOps SDLC Waterfall SDLC (Old Model) Requirements β Design β Coding β Testing β Deployment β Maintenance
Problems:
Dev & Ops are separate
Testing happens too late
Deployments are manual
Feedback comes after weeks/months
No automation
High risk, slow releases
DevOps SDLC (Modern Model) PLAN β CODE β BUILD β TEST β RELEASE β DEPLOY β OPERATE β MONITOR β FEEDBACK β PLAN
All stages run continuously and automatically.
Key upgrades:
CI/CD automates build, test, deploy
Cloud infra makes deployments scalable
IaC (Terraform/Ansible) automates infra
Monitoring gives real-time feedback
Dev & Ops collaborate closely
- Deep Dive: Each SDLC Stage with DevOps Context
Letβs break down each phase the way DevOps teams work in real companies.
3.1 PLAN β Product Requirements + Architecture Definition:
The stage where teams define what to build and how to design the system.
In DevOps:
DevOps teams participate to:
Define infra needs
Plan environments (Dev/Test/Staging/Prod)
Estimate cloud resources (cost optimization)
Decide CI/CD tools
Decide branching strategy
Plan monitoring & logging
Tools:
Jira
Notion
Confluence
Lucidchart
Example:
A team plans a microservices-based eCommerce backend on AWS using:
EC2 / ECS / Kubernetes
RDS database
S3 storage
CloudFront CDN
Terraform for IaC
Jenkins + GitHub Actions for CI/CD
3.2 CODE β Version Control + Collaboration Definition:
Writing the source code + storing it in version control.
DevOps Responsibilities:
Set up Git repo
Enforce branch protection
Implement Git branching strategy
GitFlow
Trunk-based development
Code scanning for vulnerabilities
Pre-commit hooks
Tools:
Git
GitHub / GitLab / Bitbucket
Real example: feature/login-api β pull request β code review β merge β CI pipeline starts
3.3 BUILD β Compilation + Packaging + Containerization Definition:
Build takes raw code β converts into executable artifact (binary, jar, image).
DevOps Tasks:
Create Dockerfiles
Optimize build caching
Automate builds in CI
Create repeatable builds
Tools:
Maven, Gradle (Java)
npm/yarn (Node)
Docker
Example: docker build -t webshop/auth-service:v2 .
3.4 TEST β Automated Quality Gates Definition:
Run automated tests on every code change.
DevOps Tasks:
Add test stages to CI
Fail pipeline if tests fail
Run parallel te