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

CKA study material · question 762 of 1000

A from block contains two list entries: one with a namespaceSelector and one with a podSelector. What does it allow?

  1. Only Pods matching the podSelector inside namespaces matching the namespaceSelector
  2. Nothing, because the two selectors conflict
  3. Pods in the matching namespaces, or matching Pods in the policy's own namespace
  4. Every Pod in the cluster matching either selector
Show the answer

Answer: C. Pods in the matching namespaces, or matching Pods in the policy's own namespace

Two list entries are alternatives, and a bare podSelector applies only to the policy's own namespace. Combining both selectors in a single entry is what narrows it to particular Pods in particular namespaces.

Source: Network Policies (Kubernetes) — Behavior of to and from selectors

Challenge yourself on this topic → Study as cards