Merry Christmas & Happy 2027! Less downtime. More good times. Celebrating 13 years of sorlavit.com
Skip to content
Sorlavit KimIT Support, Network & Infrastructure Services Let’s talk

Articles are written in English. The Thai translation button opens Google Translate; code and commands stay in their original form.

Kubernetes / Services, DNS & Traffic Routing

Check the actual resolver search list inside the failing Pod

A short service name can resolve differently across namespaces because the generated search list differs. Inspect the workload's resolver context.

Compiled for Sorlavit Kim · Published · Updated · 1 min read

Environment and inputs: Kubernetes · kubectl with supported client/server versions and delegated RBAC. Examples use namespace app unless noted. Check context, namespace, APIs and provider support first.

Start with this check

Check which system and tools you are using. Replace example objects, namespaces, images, file paths and hosts with approved values. Remove sensitive information before sharing output. Follow the application owner’s process for changes.

kubectl -n app exec pod/web-0 -c web -- cat /etc/resolv.conf

What the results mean

This starts a read command in the selected running container when that executable exists and access is authorized. Minimal or Windows images may need another approved method.

Fix the cause and check again

Compare search domains, nameserver and DNS policy with the intended service name. Prefer the correct namespace-qualified name where the design requires it.

Before changing production

Do not install debugging tools into production images or assume a host resolver test reproduces the Pod's path.

Share this article

Back to all articles