Question 500
At Horizon observability, in a disposable simulated environment during a monitored release window: A temporary lab Service metrics-svc for Deployment metrics-api in observability needs access through an automatically allocated NodePort, not a public load balancer. 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
Limit NodePort exposure through network controls and remove temporary external test services. This reduces recurrence of the specific operational failure. It reinforces the action: Run kubectl -n observability expose deployment metrics-api --name=metrics-svc --type=NodePort --port=8080 --target-port=3000. The relevant mechanism is: A NodePort Service allocates a cluster-configured host port on each node while retaining its cluster IP routing.
Incorrect Answers
This routine guards against another mechanism: A ClusterIP Service provides stable in-cluster virtual addressing and directs traffic to selected ready Pod endpoints. The recurring exposure in the current case is: A NodePort Service allocates a cluster-configured host port on each node while retaining its cluster IP routing. The matching preventive check is “Limit NodePort exposure through network controls and remove temporary external test services”.
The suggested review tracks a different technical risk: Port-forwarding creates a client-side tunnel to a selected backend and does not change the Service type or network exposure. Here the sustained control must address: A NodePort Service allocates a cluster-configured host port on each node while retaining its cluster IP routing. Choose “Limit NodePort exposure through network controls and remove temporary external test services”.
That safeguard is relevant to: NetworkPolicy egress rules are additive and DNS lookup requires permitted traffic to the DNS server, not only a correct Service record. The current failure instead follows from: A NodePort Service allocates a cluster-configured host port on each node while retaining its cluster IP routing. Its prevention measure is “Limit NodePort exposure through network controls and remove temporary external test services”.