Debug theo request path
Test từ debug Pod trong cluster và đi từng hop: client → DNS/ClusterIP → Service selector → EndpointSlice → Pod Ready → targetPort/containerPort. Nếu endpoint rỗng, kiểm tra label/readiness/selector; nếu endpoint có nhưng request fail, kiểm tra port, app logs, NetworkPolicy, kube-proxy/CNI và vị trí nguồn.
Failure matrix
- Không có EndpointSlice: selector/namespace/labels hoặc Pod chưa Ready.
- Endpoint có nhưng connection refused: targetPort/containerPort/app listen sai.
- Timeout: policy, route/CNI, kube-proxy hoặc external firewall; phân biệt bằng test in-cluster.
- DNS fail: service name/namespace/search domain/CoreDNS; test IP ClusterIP để tách DNS khỏi dataplane.
Bài tập
Tạo backend/Service/debug client, thực hiện năm failure drills, lưu output của từng hop và sửa từng nguyên nhân. Pass khi có response marker từ client, EndpointSlice đúng, policy có lý do và variant không làm hỏng mapping.