CertLumen

Certified Kubernetes Administrator (CKA) · Section 5 · 30% of the exam

Troubleshoot services and networking

One of the objectives of the Certified Kubernetes Administrator (CKA) exam, in the section “Troubleshooting”. Here is what it covers, the points to remember and a question to try.

What it covers

A layered method for network faults: Pod to Pod, Pod to Service, DNS, kube-proxy and the CNI, NetworkPolicies, and Ingress or Gateway routing. It covers empty endpoints, selector and port mismatches, CoreDNS failures, default-deny policies and the debug Pod toolkit.

Points to remember

  • Test from inside the cluster with a throwaway Pod, from Pod IP up to Service name.
  • Empty endpoints: selector mismatch, wrong namespace or Pods not Ready; check EndpointSlices.
  • Refused means nothing listening (check targetPort); timeout means dropped (policy, firewall, kube-proxy, CNI).
  • Pods resolve web, web.ns, web.ns.svc.cluster.local through CoreDNS at the kube-dns Service IP.
  • CoreDNS: Deployment with label k8s-app=kube-dns, configured by the coredns ConfigMap; Loop detected means a bad upstream.

Try a question

kubectl get endpoints web prints a warning that v1 Endpoints is deprecated in v1.33+; use discovery.k8s.io/v1 EndpointSlice. What is the equivalent modern check?

  1. Akubectl get services web --show-endpoints to print the Service with its backend Pod addresses
  2. Bkubectl get ep -A --force to bypass the deprecation warning and list every Endpoints object
  3. Ckubectl top endpoints web
  4. Dkubectl get endpointslices -l kubernetes.io/service-name=web
Show the answer

D. EndpointSlices are the current mechanism; the Endpoints API is deprecated but still served.

Written for practice in the style of the exam: never a question from the real exam.

In the course

The lesson Troubleshooting Services and Networking teaches this objective (about 50 minutes), and 20 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.

More in this section

← Previous objective · All 27 objectives