McAfee Secure

CNCF CKA Bundle

Exam Code: CKA

Exam Name Certified Kubernetes Administrator

Certification Provider: CNCF

Corresponding Certification: CKA

CNCF CKA Bundle $44.99

100% CNCF CKA Guaranteed Success With Testking Training Materials

Get Real CKA Exam Questions & Expert Verified Answers as Experienced on the Real Exam!

  • Questions & Answers

    CKA Questions & Answers

    58 Questions & Answers

    The ultimate exam preparation tool, Questions & Answers mirrors the actual CKA exam while allowing you to hone and measure every aspect of your test-taking ability.

  • CKA Video Course

    CKA Training Course

    138 Video Lectures

    CKA Video Course is developed by CNCF Professionals to help you pass the CKA exam.

    Description

    This course will improve your knowledge and skills required to pass Certified Kubernetes Administrator exam.
  • Study Guide

    CKA Study Guide

    268 PDF Pages

    Developed by industry experts, this 268-page guide spells out in painstaking detail all of the information you need to ace CKA exam.

Certified Kubernetes Administrator (CKA) Practice Tests

Satisfaction Guaranteed

Money Back Guarantee

Testking provides hassle-free money back guarantee with our products. That is because we have 100% trust in the abilities of our professional and experience product team, and our record is a proof of that.

99.6% PASS RATE
Total Cost: $194.97
Bundle Price: $149.98

Purchase Individually

  • Questions & Answers

    Questions & Answers

    58 Questions

    $124.99
  • CKA Video Course

    Training Course

    138 Video Lectures

    $39.99
  • Study Guide

    Study Guide

    268 PDF Pages

    $29.99

CNCF CKA Practice Test 68

Question 670

At Pinecrest logistics, in a sandbox Kubernetes cluster during a recovery tabletop exercise: Service backend Pods for dispatch-api in fulfillment must accept port 9090 traffic from a namespace carrying label access=approved via a reviewed policy file. Work only within the stated target and verify before declaring success. Which Kubernetes behavior best explains the required change or diagnosis?

  1. A namespaceSelector in a NetworkPolicy ingress peer matches namespace labels; it differs from matching arbitrary Pod labels across namespaces.
  2. A NodePort Service allocates a cluster-configured host port on each node while retaining its cluster IP routing.
  3. A selecting NetworkPolicy with ingress isolation and no allow rules denies new ingress to selected Pods except protocol-specific policy behavior; it does not itself control egress.
  4. EndpointSlices represent Service backend addresses and readiness; Service existence alone does not prove endpoints exist.

Explanation

Correct Answer

A:

A namespaceSelector in a NetworkPolicy ingress peer matches namespace labels; it differs from matching arbitrary Pod labels across namespaces. This explains the stated condition. The corresponding action is: Run kubectl -n fulfillment apply -f ./policies/dispatch-api-cross-namespace.yaml after confirming its namespaceSelector and TCP port 9090. The direct acceptance evidence is: Run authorized connectivity probes from both approved and unapproved namespaces.

Incorrect Answers

B:

This principle describes a separate cause: A NodePort Service allocates a cluster-configured host port on each node while retaining its cluster IP routing. The reported condition is governed by: A namespaceSelector in a NetworkPolicy ingress peer matches namespace labels; it differs from matching arbitrary Pod labels across namespaces. The two mechanisms should not be conflated.

C:

A selecting NetworkPolicy with ingress isolation and no allow rules denies new ingress to selected Pods except protocol-specific policy behavior; it does not itself control egress. That explanation applies to a different technical failure. Here the controlling principle is: A namespaceSelector in a NetworkPolicy ingress peer matches namespace labels; it differs from matching arbitrary Pod labels across namespaces.

D:

The offered statement is true for this other mechanism: EndpointSlices represent Service backend addresses and readiness; Service existence alone does not prove endpoints exist. It does not explain the facts described here, which follow from: A namespaceSelector in a NetworkPolicy ingress peer matches namespace labels; it differs from matching arbitrary Pod labels across namespaces.

Question 671

At Pinecrest logistics, in a sandbox Kubernetes cluster during a recovery tabletop exercise: Service backend Pods for dispatch-api in fulfillment must accept port 9090 traffic from a namespace carrying label access=approved via a reviewed policy file. Work only within the stated target and verify before declaring success. Which observation best verifies the requested outcome rather than an unrelated state?

  1. Run an in-Pod nslookup dispatch-svc.fulfillment.svc.cluster.local and confirm name resolution under isolation.
  2. Run authorized connectivity probes from both approved and unapproved namespaces.
  3. Run kubectl -n fulfillment get httproute dispatch-route -o yaml and inspect parent acceptance and resolved-reference conditions.
  4. Run kubectl -n ledger get networkpolicy invoice-api-deny-ingress -o yaml and perform an authorized denied-connection probe.

Explanation

Correct Answer

B:

Run authorized connectivity probes from both approved and unapproved namespaces. This validates the affected object or control path, rather than only showing a command completed. The underlying reason is: A namespaceSelector in a NetworkPolicy ingress peer matches namespace labels; it differs from matching arbitrary Pod labels across namespaces. The intended action is: Run kubectl -n fulfillment apply -f ./policies/dispatch-api-cross-namespace.yaml after confirming its namespaceSelector and TCP port 9090.

Incorrect Answers

A:

This observation would test a different technical dependency: NetworkPolicy egress rules are additive and DNS lookup requires permitted traffic to the DNS server, not only a correct Service record. The current issue is governed by: A namespaceSelector in a NetworkPolicy ingress peer matches namespace labels; it differs from matching arbitrary Pod labels across namespaces. Its decisive check is “Run authorized connectivity probes from both approved and unapproved namespaces”.

C:

That test belongs to another control with this basis: Gateway API HTTPRoutes express matching and backend behavior while Gateway resources own compatible listeners. In the current case, the governing reason is: A namespaceSelector in a NetworkPolicy ingress peer matches namespace labels; it differs from matching arbitrary Pod labels across namespaces. The direct verification is “Run authorized connectivity probes from both approved and unapproved namespaces”.

D:

This observation would test a different technical dependency: A selecting NetworkPolicy with ingress isolation and no allow rules denies new ingress to selected Pods except protocol-specific policy behavior; it does not itself control egress. The current issue is governed by: A namespaceSelector in a NetworkPolicy ingress peer matches namespace labels; it differs from matching arbitrary Pod labels across namespaces. Its decisive check is “Run authorized connectivity probes from both approved and unapproved namespaces”.

Question 672

At Pinecrest logistics, in a sandbox Kubernetes cluster during a recovery tabletop exercise: Service backend Pods for dispatch-api in fulfillment must accept port 9090 traffic from a namespace carrying label access=approved via a reviewed policy file. Work only within the stated target and verify before declaring success. Which operational control most directly prevents this failure or configuration drift?

  1. Verify peer label governance and avoid permitting all namespace workloads accidentally.
  2. Include EndpointSlice and readiness checks in Service connectivity runbooks.
  3. Maintain namespace label ownership and validate that policy selectors cannot be self-assigned by untrusted teams.
  4. Check gateway class/controller compatibility and delegate route attachment privileges deliberately.

Explanation

Correct Answer

C:

Maintain namespace label ownership and validate that policy selectors cannot be self-assigned by untrusted teams. This reduces recurrence of the specific operational failure. It reinforces the action: Run kubectl -n fulfillment apply -f ./policies/dispatch-api-cross-namespace.yaml after confirming its namespaceSelector and TCP port 9090. The relevant mechanism is: A namespaceSelector in a NetworkPolicy ingress peer matches namespace labels; it differs from matching arbitrary Pod labels across namespaces.

Incorrect Answers

A:

The suggested review tracks a different technical risk: An ingress rule with a podSelector selects source Pods in its own namespace unless combined with other peer selectors. Here the sustained control must address: A namespaceSelector in a NetworkPolicy ingress peer matches namespace labels; it differs from matching arbitrary Pod labels across namespaces. Choose “Maintain namespace label ownership and validate that policy selectors cannot be self-assigned by untrusted teams”.

B:

That safeguard is relevant to: EndpointSlices represent Service backend addresses and readiness; Service existence alone does not prove endpoints exist. The current failure instead follows from: A namespaceSelector in a NetworkPolicy ingress peer matches namespace labels; it differs from matching arbitrary Pod labels across namespaces. Its prevention measure is “Maintain namespace label ownership and validate that policy selectors cannot be self-assigned by untrusted teams”.

D:

The suggested review tracks a different technical risk: Gateway API separates infrastructure listener ownership from application route attachments and depends on controller support. Here the sustained control must address: A namespaceSelector in a NetworkPolicy ingress peer matches namespace labels; it differs from matching arbitrary Pod labels across namespaces. Choose “Maintain namespace label ownership and validate that policy selectors cannot be self-assigned by untrusted teams”.

Question 673

At Northstar finance, in an isolated training cluster during a scheduled maintenance rehearsal: The lab cluster has an Ingress controller named nginx; an Ingress invoice-ingress in ledger must route invoice.example.test path / to Service invoice-svc port 80. Work only within the stated target and verify before declaring success. Which command or initial safe diagnostic step best addresses the stated lab task?

  1. Run kubectl -n ledger create ingress invoice-ingress --class=nginx --rule='invoice.example.test/=invoice-svc:80' after confirming the Service exists.
  2. Run kubectl -n ledger get endpointslices -l kubernetes.io/service-name=invoice-svc -o wide.
  3. Run kubectl -n ledger expose deployment invoice-api --name=invoice-svc --type=LoadBalancer --port=80 --target-port=8080.
  4. Run kubectl -n ledger patch service invoice-svc --type=merge -p '{"spec":{"ports":[{"port":80,"targetPort":8080}]}}' for the lab's single-port Service.

Explanation

Correct Answer

A:

Run kubectl -n ledger create ingress invoice-ingress --class=nginx --rule='invoice.example.test/=invoice-svc:80' after confirming the Service exists. This is the appropriate command-line action or first safe diagnostic. The technical reason is: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller. Validate the result with: Run kubectl -n ledger describe ingress invoice-ingress and test the route through the controller address using the expected Host header. Execute changes only in an authorized disposable lab or after normal production change controls.

Incorrect Answers

B:

This alternative is a response to another technical cause: EndpointSlices represent Service backend addresses and readiness; Service existence alone does not prove endpoints exist. The reported case instead depends on: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller. The action that directly addresses it is “Run kubectl -n ledger create ingress invoice-ingress --class=nginx --rule='invoice.example.test/=invoice-svc:80' after confirming the Service exists”.

C:

The proposed action belongs to the mechanism: LoadBalancer Services request external routing from a supported infrastructure controller; a bare cluster does not guarantee an external address. Here the stated fault follows a different mechanism: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller. The corrective choice is “Run kubectl -n ledger create ingress invoice-ingress --class=nginx --rule='invoice.example.test/=invoice-svc:80' after confirming the Service exists”.

D:

The offered action targets: The Service port is what clients connect to, while targetPort must reach the actual backend listener. The case facts point instead to: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller. Implement “Run kubectl -n ledger create ingress invoice-ingress --class=nginx --rule='invoice.example.test/=invoice-svc:80' after confirming the Service exists” to address that specific condition.

Question 674

At Northstar finance, in an isolated training cluster during a scheduled maintenance rehearsal: The lab cluster has an Ingress controller named nginx; an Ingress invoice-ingress in ledger must route invoice.example.test path / to Service invoice-svc port 80. Work only within the stated target and verify before declaring success. Which Kubernetes behavior best explains the required change or diagnosis?

  1. A ClusterIP Service provides stable in-cluster virtual addressing and directs traffic to selected ready Pod endpoints.
  2. An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller.
  3. The Service port is what clients connect to, while targetPort must reach the actual backend listener.
  4. Port-forwarding creates a client-side tunnel to a selected backend and does not change the Service type or network exposure.

Explanation

Correct Answer

B:

An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller. This explains the stated condition. The corresponding action is: Run kubectl -n ledger create ingress invoice-ingress --class=nginx --rule='invoice.example.test/=invoice-svc:80' after confirming the Service exists. The direct acceptance evidence is: Run kubectl -n ledger describe ingress invoice-ingress and test the route through the controller address using the expected Host header.

Incorrect Answers

A:

This principle describes a separate cause: A ClusterIP Service provides stable in-cluster virtual addressing and directs traffic to selected ready Pod endpoints. The reported condition is governed by: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller. The two mechanisms should not be conflated.

C:

The offered statement is true for this other mechanism: The Service port is what clients connect to, while targetPort must reach the actual backend listener. It does not explain the facts described here, which follow from: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller.

D:

This principle describes a separate cause: Port-forwarding creates a client-side tunnel to a selected backend and does not change the Service type or network exposure. The reported condition is governed by: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller. The two mechanisms should not be conflated.

Question 675

At Northstar finance, in an isolated training cluster during a scheduled maintenance rehearsal: The lab cluster has an Ingress controller named nginx; an Ingress invoice-ingress in ledger must route invoice.example.test path / to Service invoice-svc port 80. Work only within the stated target and verify before declaring success. Which observation best verifies the requested outcome rather than an unrelated state?

  1. Run kubectl -n ledger describe ingress invoice-ingress and verify its TLS mapping, then perform a certificate-validating HTTPS test.
  2. Run kubectl -n fulfillment get networkpolicy dispatch-api-deny-ingress -o yaml and perform an authorized denied-connection probe.
  3. Run kubectl -n ledger describe ingress invoice-ingress and test the route through the controller address using the expected Host header.
  4. Run kubectl -n ledger get networkpolicy invoice-api-deny-ingress -o yaml and perform an authorized denied-connection probe.

Explanation

Correct Answer

C:

Run kubectl -n ledger describe ingress invoice-ingress and test the route through the controller address using the expected Host header. This validates the affected object or control path, rather than only showing a command completed. The underlying reason is: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller. The intended action is: Run kubectl -n ledger create ingress invoice-ingress --class=nginx --rule='invoice.example.test/=invoice-svc:80' after confirming the Service exists.

Incorrect Answers

A:

The alternative verifies a different condition: Ingress TLS termination relies on a controller and a referenced TLS Secret; updating a Service alone does not install certificates. The current case instead depends on: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller. Confirm that “Run kubectl -n ledger describe ingress invoice-ingress and test the route through the controller address using the expected Host header”.

B:

That test belongs to another control with this basis: A selecting NetworkPolicy with ingress isolation and no allow rules denies new ingress to selected Pods except protocol-specific policy behavior; it does not itself control egress. In the current case, the governing reason is: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller. The direct verification is “Run kubectl -n ledger describe ingress invoice-ingress and test the route through the controller address using the expected Host header”.

D:

The alternative verifies a different condition: A selecting NetworkPolicy with ingress isolation and no allow rules denies new ingress to selected Pods except protocol-specific policy behavior; it does not itself control egress. The current case instead depends on: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller. Confirm that “Run kubectl -n ledger describe ingress invoice-ingress and test the route through the controller address using the expected Host header”.

Question 676

At Northstar finance, in an isolated training cluster during a scheduled maintenance rehearsal: The lab cluster has an Ingress controller named nginx; an Ingress invoice-ingress in ledger must route invoice.example.test path / to Service invoice-svc port 80. Work only within the stated target and verify before declaring success. Which operational control most directly prevents this failure or configuration drift?

  1. Maintain namespace label ownership and validate that policy selectors cannot be self-assigned by untrusted teams.
  2. Limit NodePort exposure through network controls and remove temporary external test services.
  3. Include DNS as an explicit dependency when designing egress policies for isolated Pods.
  4. Review ingress class ownership and avoid exposing test applications outside intended environments.

Explanation

Correct Answer

D:

Review ingress class ownership and avoid exposing test applications outside intended environments. This reduces recurrence of the specific operational failure. It reinforces the action: Run kubectl -n ledger create ingress invoice-ingress --class=nginx --rule='invoice.example.test/=invoice-svc:80' after confirming the Service exists. The relevant mechanism is: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller.

Incorrect Answers

A:

That safeguard is relevant to: A namespaceSelector in a NetworkPolicy ingress peer matches namespace labels; it differs from matching arbitrary Pod labels across namespaces. The current failure instead follows from: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller. Its prevention measure is “Review ingress class ownership and avoid exposing test applications outside intended environments”.

B:

This routine guards against another mechanism: A NodePort Service allocates a cluster-configured host port on each node while retaining its cluster IP routing. The recurring exposure in the current case is: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller. The matching preventive check is “Review ingress class ownership and avoid exposing test applications outside intended environments”.

C:

The suggested review tracks a different technical risk: NetworkPolicy egress rules are additive and DNS lookup requires permitted traffic to the DNS server, not only a correct Service record. Here the sustained control must address: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller. Choose “Review ingress class ownership and avoid exposing test applications outside intended environments”.

Question 677

At Horizon observability, in a disposable simulated environment during a monitored release window: The lab cluster has an Ingress controller named nginx; an Ingress metrics-ingress in observability must route metrics.example.test path / to Service metrics-svc port 8080. Work only within the stated target and verify before declaring success. Which command or initial safe diagnostic step best addresses the stated lab task?

  1. Run kubectl -n observability apply -f ./gateway/metrics-api-route.yaml after confirming parentRefs, hostnames and backendRefs.
  2. Run kubectl -n observability create ingress metrics-ingress --class=nginx --rule='metrics.example.test/=metrics-svc:8080' after confirming the Service exists.
  3. Run kubectl -n observability port-forward service/metrics-svc 18081:8080 in a temporary session.
  4. Run kubectl -n observability apply -f ./gateway/metrics-api-gateway.yaml after confirming GatewayClass and listener settings.

Explanation

Correct Answer

B:

Run kubectl -n observability create ingress metrics-ingress --class=nginx --rule='metrics.example.test/=metrics-svc:8080' after confirming the Service exists. This is the appropriate command-line action or first safe diagnostic. The technical reason is: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller. Validate the result with: Run kubectl -n observability describe ingress metrics-ingress and test the route through the controller address using the expected Host header. Execute changes only in an authorized disposable lab or after normal production change controls.

Incorrect Answers

A:

This alternative is a response to another technical cause: Gateway API HTTPRoutes express matching and backend behavior while Gateway resources own compatible listeners. The reported case instead depends on: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller. The action that directly addresses it is “Run kubectl -n observability create ingress metrics-ingress --class=nginx --rule='metrics.example.test/=metrics-svc:8080' after confirming the Service exists”.

C:

The offered action targets: Port-forwarding creates a client-side tunnel to a selected backend and does not change the Service type or network exposure. The case facts point instead to: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller. Implement “Run kubectl -n observability create ingress metrics-ingress --class=nginx --rule='metrics.example.test/=metrics-svc:8080' after confirming the Service exists” to address that specific condition.

D:

This alternative is a response to another technical cause: Gateway API separates infrastructure listener ownership from application route attachments and depends on controller support. The reported case instead depends on: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller. The action that directly addresses it is “Run kubectl -n observability create ingress metrics-ingress --class=nginx --rule='metrics.example.test/=metrics-svc:8080' after confirming the Service exists”.

Question 678

At Horizon observability, in a disposable simulated environment during a monitored release window: The lab cluster has an Ingress controller named nginx; an Ingress metrics-ingress in observability must route metrics.example.test path / to Service metrics-svc port 8080. Work only within the stated target and verify before declaring success. Which Kubernetes behavior best explains the required change or diagnosis?

  1. EndpointSlices represent Service backend addresses and readiness; Service existence alone does not prove endpoints exist.
  2. A selecting NetworkPolicy with ingress isolation and no allow rules denies new ingress to selected Pods except protocol-specific policy behavior; it does not itself control egress.
  3. An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller.
  4. Ingress TLS termination relies on a controller and a referenced TLS Secret; updating a Service alone does not install certificates.

Explanation

Correct Answer

C:

An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller. This explains the stated condition. The corresponding action is: Run kubectl -n observability create ingress metrics-ingress --class=nginx --rule='metrics.example.test/=metrics-svc:8080' after confirming the Service exists. The direct acceptance evidence is: Run kubectl -n observability describe ingress metrics-ingress and test the route through the controller address using the expected Host header.

Incorrect Answers

A:

EndpointSlices represent Service backend addresses and readiness; Service existence alone does not prove endpoints exist. That explanation applies to a different technical failure. Here the controlling principle is: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller.

B:

The offered statement is true for this other mechanism: A selecting NetworkPolicy with ingress isolation and no allow rules denies new ingress to selected Pods except protocol-specific policy behavior; it does not itself control egress. It does not explain the facts described here, which follow from: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller.

D:

Ingress TLS termination relies on a controller and a referenced TLS Secret; updating a Service alone does not install certificates. That explanation applies to a different technical failure. Here the controlling principle is: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller.

Question 679

At Horizon observability, in a disposable simulated environment during a monitored release window: The lab cluster has an Ingress controller named nginx; an Ingress metrics-ingress in observability must route metrics.example.test path / to Service metrics-svc port 8080. Work only within the stated target and verify before declaring success. Which observation best verifies the requested outcome rather than an unrelated state?

  1. Run kubectl -n observability get endpointslices -l kubernetes.io/service-name=metrics-svc and verify addresses for the intended Pods.
  2. Run kubectl -n observability describe networkpolicy metrics-api-deny-egress and test expected blocked destinations.
  3. Run kubectl -n fulfillment describe ingress dispatch-ingress and verify its TLS mapping, then perform a certificate-validating HTTPS test.
  4. Run kubectl -n observability describe ingress metrics-ingress and test the route through the controller address using the expected Host header.

Explanation

Correct Answer

D:

Run kubectl -n observability describe ingress metrics-ingress and test the route through the controller address using the expected Host header. This validates the affected object or control path, rather than only showing a command completed. The underlying reason is: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller. The intended action is: Run kubectl -n observability create ingress metrics-ingress --class=nginx --rule='metrics.example.test/=metrics-svc:8080' after confirming the Service exists.

Incorrect Answers

A:

That test belongs to another control with this basis: Services select matching Pods; an unmatched selector can leave EndpointSlices without usable backends despite healthy Pods. In the current case, the governing reason is: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller. The direct verification is “Run kubectl -n observability describe ingress metrics-ingress and test the route through the controller address using the expected Host header”.

B:

This observation would test a different technical dependency: An egress-isolating NetworkPolicy can block Pod outbound connections; DNS and required dependencies need explicit allowances. The current issue is governed by: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller. Its decisive check is “Run kubectl -n observability describe ingress metrics-ingress and test the route through the controller address using the expected Host header”.

C:

The alternative verifies a different condition: Ingress TLS termination relies on a controller and a referenced TLS Secret; updating a Service alone does not install certificates. The current case instead depends on: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller. Confirm that “Run kubectl -n observability describe ingress metrics-ingress and test the route through the controller address using the expected Host header”.

Question 680

At Horizon observability, in a disposable simulated environment during a monitored release window: The lab cluster has an Ingress controller named nginx; an Ingress metrics-ingress in observability must route metrics.example.test path / to Service metrics-svc port 8080. Work only within the stated target and verify before declaring success. Which operational control most directly prevents this failure or configuration drift?

  1. Review ingress class ownership and avoid exposing test applications outside intended environments.
  2. Include EndpointSlice and readiness checks in Service connectivity runbooks.
  3. Test security policies from allowed and denied sources rather than trusting YAML alone.
  4. Include DNS as an explicit dependency when designing egress policies for isolated Pods.

Explanation

Correct Answer

A:

Review ingress class ownership and avoid exposing test applications outside intended environments. This reduces recurrence of the specific operational failure. It reinforces the action: Run kubectl -n observability create ingress metrics-ingress --class=nginx --rule='metrics.example.test/=metrics-svc:8080' after confirming the Service exists. The relevant mechanism is: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller.

Incorrect Answers

B:

The suggested review tracks a different technical risk: EndpointSlices represent Service backend addresses and readiness; Service existence alone does not prove endpoints exist. Here the sustained control must address: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller. Choose “Review ingress class ownership and avoid exposing test applications outside intended environments”.

C:

That safeguard is relevant to: A selecting NetworkPolicy with ingress isolation and no allow rules denies new ingress to selected Pods except protocol-specific policy behavior; it does not itself control egress. The current failure instead follows from: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller. Its prevention measure is “Review ingress class ownership and avoid exposing test applications outside intended environments”.

D:

This routine guards against another mechanism: NetworkPolicy egress rules are additive and DNS lookup requires permitted traffic to the DNS server, not only a correct Service record. The recurring exposure in the current case is: An Ingress resource declares HTTP host/path routing but requires an actual installed Ingress controller. The matching preventive check is “Review ingress class ownership and avoid exposing test applications outside intended environments”.