An administrator is troubleshooting a Kubernetes deployment that is not receiving traffic. The deployment has one replica and the pod is running. The service is of type ClusterIP. Which command would help verify that the service endpoints are correctly associated with the pod?
Trap 1: kubectl describe pod
Shows pod details but not service endpoints.
Trap 2: kubectl get pods -o wide
Shows pod IPs but not service association.
Trap 3: kubectl get svc
Shows service details but not endpoints.
- A
kubectl describe pod
Why wrong: Shows pod details but not service endpoints.
- B
kubectl get pods -o wide
Why wrong: Shows pod IPs but not service association.
- C
kubectl get svc
Why wrong: Shows service details but not endpoints.
- D
kubectl get endpoints
Correct. This shows the endpoints associated with each service.