- Home
- All questions
- Question 265
CKA study material · question 265 of 1000
How does a NetworkPolicy target a namespace by its name?
Show the answer
Answer: D. With a namespaceSelector matching the kubernetes.io/metadata.name label
The control plane stamps an immutable kubernetes.io/metadata.name label on every namespace for exactly this.
Source: Network Policies (Kubernetes) — Targeting a Namespace by its name