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

Investigate a Pod using an unexpected DNS policy

A host-networked or specially configured Pod can resolve names differently from ordinary application Pods. Inspect DNS configuration intent.

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 get pod web-0 -o jsonpath='{.spec.hostNetwork}{" "}{.spec.dnsPolicy}{" "}{.spec.dnsConfig}'

What the results mean

The fields describe Pod DNS policy and overrides. The node's resolver behavior and cluster domain still influence the resulting configuration.

Fix the cause and check again

Compare policy with the supported host-network or normal-Pod design, then inspect the actual resolver file through an approved method. Correct only the intended workload configuration.

Before changing production

Do not hard-code a public resolver into every Pod or bypass internal service discovery.

Share this article

Back to all articles