KCNA Container Orchestration Practice Question
Which Kubernetes resource can be used to define network policies that control traffic between pods?
⚠ Common exam trap
CNCF often tests the misconception that Ingress or Service can restrict pod-to-pod traffic, but Ingress only handles external HTTP/HTTPS traffic and Service only provides connectivity, not policy enforcement.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
NetworkPolicy
NetworkPolicy is a Kubernetes resource that defines how groups of pods are allowed to communicate with each other and other network endpoints. It works by specifying ingress and egress rules using pod selectors, namespace selectors, and IP blocks, and is enforced by a network plugin (CNI) that supports it, such as Calico or Cilium.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Service
Why it's wrong here
A Service provides stable virtual IPs and load balancing to a pod set; it forwards traffic rather than permitting or denying it. It is tempting because Services genuinely define how pods are reached, which suits service discovery and exposure, whereas inter-pod traffic control requires NetworkPolicy.
- ✗
PodSecurityPolicy
Why it's wrong here
PodSecurityPolicy governs pod security contexts — privileges, volumes, capabilities — and never inspects network traffic between pods. It is tempting because it genuinely restricts what pods may do at admission time, which suits hardening workloads, but traffic filtering between pods requires NetworkPolicy.
- ✓
NetworkPolicy
Why this is correct
NetworkPolicy is the native Kubernetes API object that selects pods via label selectors and defines ingress and egress rules, so it directly satisfies the requirement to control traffic between pods. It operates at layer 3/4 and requires a CNI plugin that enforces the policies.
- ✗
Ingress
Why it's wrong here
Ingress manages inbound HTTP and HTTPS routing to Services; it does not select pods or define allow/deny rules between them. It is tempting because Ingress genuinely controls external access into the cluster, which suits exposing applications, whereas pod-to-pod traffic control requires NetworkPolicy.
Go deeper
Related to this question
About these practice questions
This KCNA question is part of Courseiva's 930-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This KCNA practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the KCNA exam.