Kubernetes and Cloud Native Associate (KCNA) — Question 42
What is the role of a NetworkPolicy in Kubernetes?
Answer options
- A. The ability to cryptic and obscure all traffic.
- B. The ability to classify the Pods as isolated and non isolated.
- C. The ability to prevent loopback or incoming host traffic.
- D. The ability to log network security events.
Correct answer: B
Explanation
The correct answer is B because a NetworkPolicy is used to define rules that specify how groups of Pods can communicate with each other and with other network endpoints. Options A, C, and D describe functionalities that do not align with the primary purpose of NetworkPolicies, which is focused on pod communication classification rather than encryption, blocking, or logging.