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.
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.