Interview Prep/Kubernetes/Observability & Day-2 Operations

How would you debug a Service that returns "connection refused" or times out?

IntermediateProductionObservability & Day-2 Operations
Answer

Walk the path: Pod Ready? kubectl get endpointslices populated? Selector matches labels? targetPort equals the container port? App binds to 0.0.0.0 and not localhost? NetworkPolicy blocking? kube-proxy/CNI healthy on the node? Test from a debug Pod to the Pod IP, then to the ClusterIP, then DNS.

kubectl get endpointslices -l kubernetes.io/service-name=web
kubectl run t --rm -it --image=nicolaka/netshoot -- curl -sv web.shop.svc:80
All Kubernetes questions

More on Observability & Day-2 Operations