Resolve names through cluster DNS
- 12 min
- 6 steps
- Networking
Steps
0 of 6 done
Read a pod's resolver settings, resolve Services across namespaces and pods behind a headless Service, find CoreDNS's upstream, and cut the search-list walk.
Step 1 of 6
Find the nameserver, the search list and the
ndotsvalue that thetoolboxpod inshopresolves names with.Checked against what your commands print.
Step 2, not started: From
toolbox, the nameledgerdoes not resolve, although aledgerService exists. Resolve it with the shortest name that works fromshop.Step 3, not started:
dbinshopis a headless Service in front of a StatefulSet. Resolve the name that always points at the first replica, and only at it.Step 4, not started: Find where CoreDNS sends queries for names outside the cluster domain.
Step 5, not started: List the pod addresses behind the cluster DNS Service. It keeps the name it had before CoreDNS existed.
Step 6, not started:
toolboxmostly calls external hosts such asapi.example.com. Change its Deployment so that any name with two or more dots is tried as an absolute name first.
Enter runs the command. Tab completes, and the arrow keys recall earlier commands. Control C stops a watch. On an empty line, or after Escape, Tab moves focus out of the terminal.