Question 560
At Horizon observability, in a disposable simulated environment during a monitored release window: An operator needs a temporary localhost tunnel to Service metrics-svc in observability to debug port 8080 without exposing a public endpoint. Work only within the stated target and verify before declaring success. Which operational control most directly prevents this failure or configuration drift?
Explanation
Correct Answer
Prefer short-lived diagnostic tunnels and avoid treating port-forward as a production ingress path. This reduces recurrence of the specific operational failure. It reinforces the action: Run kubectl -n observability port-forward service/metrics-svc 18081:8080 in a temporary session. The relevant mechanism is: Port-forwarding creates a client-side tunnel to a selected backend and does not change the Service type or network exposure.
Incorrect Answers
This routine guards against another mechanism: EndpointSlices represent Service backend addresses and readiness; Service existence alone does not prove endpoints exist. The recurring exposure in the current case is: Port-forwarding creates a client-side tunnel to a selected backend and does not change the Service type or network exposure. The matching preventive check is “Prefer short-lived diagnostic tunnels and avoid treating port-forward as a production ingress path”.
The suggested review tracks a different technical risk: The Service port is what clients connect to, while targetPort must reach the actual backend listener. Here the sustained control must address: Port-forwarding creates a client-side tunnel to a selected backend and does not change the Service type or network exposure. Choose “Prefer short-lived diagnostic tunnels and avoid treating port-forward as a production ingress path”.
This routine guards against another mechanism: Cluster DNS should resolve Service names inside its configured domain; host-side DNS results do not prove in-cluster resolution. The recurring exposure in the current case is: Port-forwarding creates a client-side tunnel to a selected backend and does not change the Service type or network exposure. The matching preventive check is “Prefer short-lived diagnostic tunnels and avoid treating port-forward as a production ingress path”.