Added
A backend Deployment in namespace storefront is healthy, but an internal client in namespace checkout cannot connect through the Service. The Service is type ClusterIP and selects Pods labeled app=orders. Its port is 80 and targetPort is 8080. The backend container listens on 8080, and the client resolves the Service name to a ClusterIP. A NetworkPolicy in storefront selects the backend Pods and allows ingress only from Pods labeled role=frontend in storefront. What is the most direct fix while preserving the current Service and namespace separation?
The Service port mapping is already correct: clients connect to port 80, which forwards to the backend's listening port 8080. The stated NetworkPolicy selects the backend Pods and permits ingress only from matching Pods in storefront, so the checkout client is denied. Add a narrowly scoped ingress rule selecting the checkout namespace and required TCP port. Changing to NodePort does not reliably bypass Pod network policy. Changing targetPort breaks the mapping, and an egress rule on the backend policy does not authorize incoming client traffic.