Diagnosing Kubernetes Service DNS and HTTP access
Service name resolution or HTTP fails inside the cluster.
Problem
Service name resolution or HTTP fails inside the cluster.
Cause
Possible causes include the resolver, EndpointSlices, readiness, ports, and network policy.
Solution
Test DNS and HTTP separately from a client Pod. For DNS failures check the resolver and cluster DNS. For HTTP failures check ready endpoints, targetPort, and NetworkPolicy.
kubectl get service SERVICE -n NAMESPACE
kubectl get endpointslices -n NAMESPACE -l kubernetes.io/service-name=SERVICE