Study. uk . com
  1. Home
  2. All questions
  3. Question 797

CKA study material · question 797 of 1000

You need a NetworkPolicy that limits who may reach an nginx Service. What does the policy actually select?

  1. The Service by name in a serviceSelector
  2. The Service's cluster IP in an ipBlock
  3. The labels on the Pods behind the Service
  4. The Service's EndpointSlice by label
Show the answer

Answer: C. The labels on the Pods behind the Service

NetworkPolicy operates on Pods, not Services, so restricting access to a Service means writing a podSelector matching the Pods that back it.

Source: Declare Network Policy (Kubernetes) — Limit access to the nginx service

Challenge yourself on this topic → Study as cards