Live task: a pod can't reach an external API, but other pods can. Find the cause.

AdvancedHands-onLive debugging tasks
Answer
kubectl get pod payments-abc -o wide                     # namespace, node, IP
kubectl get networkpolicy -n payments                    # an egress policy only in this namespace?
kubectl describe networkpolicy -n payments
kubectl exec -n payments payments-abc -- nslookup api.stripe.com    # DNS egress (UDP/TCP 53) allowed?
kubectl exec -n payments payments-abc -- curl -sv --max-time 5 https://api.stripe.com
kubectl get pod payments-abc -o jsonpath='{.spec.dnsPolicy} {.spec.hostNetwork}'

Typical finding: a default-deny egress NetworkPolicy in that namespace allows the app's port but not DNS to kube-dns on port 53. Fix by adding an egress rule to the kube-system CoreDNS pods on UDP and TCP 53, plus 443 to the external range. Other possibilities: per-pod security groups (EKS Security Groups for Pods), or the pod landing on a node in a subnet without a NAT route.

Key trick → "Only this pod fails" means compare what is unique to it: namespace policies, node or subnet, service account, and pod-level security groups.

All Real-World Interview questions Roadmap: Interview readiness

More on Live debugging tasks