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

ปุ่มแปลไทยจะเปิดบทความผ่าน Google Translate เพื่อแปลอัตโนมัติ โดยคงโค้ดและคำสั่งไว้ตามต้นฉบับ

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

Confirm the environment and replace sample objects, namespaces, images, paths and hosts with approved targets. Share only relevant, sanitized output. Follow the workload owner’s process for changes.

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

Read the result

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.

Resolve and verify

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