Why shouldn't you use `hostNetwork: true` for application pods?
BeginnerProductionKubernetes & Service Networking in Production
Answer
The pod shares the node's network namespace, so ports collide between pods, NetworkPolicy generally cannot isolate it, it can reach node-local services (kubelet, metadata), and it bypasses the pod network's controls.
Reserve it for node agents and CNI or ingress daemons that truly need it.
More on Kubernetes & Service Networking in Production
How do you expose an application on Kubernetes to the internet in production?BeginnerALB IP mode versus instance mode on EKS: which should you use?IntermediateHow do you achieve graceful pod shutdown with no dropped requests?AdvancedHow do readiness, liveness and startup probes interact with traffic?BeginnerHow do you design default-deny NetworkPolicies without breaking DNS?IntermediateHow do you debug "pod cannot reach service" in Kubernetes?Advanced