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

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

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

Read the result

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

Resolve and verify

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