Troubleshooting Service Discovery

Service registration and discovery involves a lot of moving parts. If a single one of them stops working, the whole process can potentially break. Let’s quickly run through what needs to be working and how to check them.

Kubernetes uses the cluster DNS as its service registry. It runs as a set of Pods in the kube-system Namespace, with a Service object providing a stable network endpoint. The important components are:

  • Pods: managed by the coredns Deployment
  • Service: a ClusterIP Service called kube-dns listening on port 53 TCP/UDP
  • Endpoint: also called kube-dns

All objects relating to the cluster DNS are tagged with the k8s-app=kube-dns label. This is helpful when filtering kubectl output.

Step one: check for running Deployments and Pods

Make sure that the coredns Deployment and its managed Pods are up and running.

Get hands-on with 1200+ tech skills courses.