Question 630
At Horizon observability, in a disposable simulated environment during a monitored release window: A reviewed ./policies/metrics-api-deny-egress.yaml selects the application in observability and defines egress isolation without allow exceptions. Work only within the stated target and verify before declaring success. Which Kubernetes behavior best explains the required change or diagnosis?
Explanation
Correct Answer
An egress-isolating NetworkPolicy can block Pod outbound connections; DNS and required dependencies need explicit allowances. This explains the stated condition. The corresponding action is: Run kubectl -n observability apply -f ./policies/metrics-api-deny-egress.yaml after reviewing impact on DNS and observability. The direct acceptance evidence is: Run kubectl -n observability describe networkpolicy metrics-api-deny-egress and test expected blocked destinations.
Incorrect Answers
Gateway API HTTPRoutes express matching and backend behavior while Gateway resources own compatible listeners. That explanation applies to a different technical failure. Here the controlling principle is: An egress-isolating NetworkPolicy can block Pod outbound connections; DNS and required dependencies need explicit allowances.
The offered statement is true for this other mechanism: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller. It does not explain the facts described here, which follow from: An egress-isolating NetworkPolicy can block Pod outbound connections; DNS and required dependencies need explicit allowances.
A namespaceSelector in a NetworkPolicy ingress peer matches namespace labels; it differs from matching arbitrary Pod labels across namespaces. That explanation applies to a different technical failure. Here the controlling principle is: An egress-isolating NetworkPolicy can block Pod outbound connections; DNS and required dependencies need explicit allowances.