By default, pods in a Kubernetes cluster can communicate with any other pod in any namespace. You want to restrict traffic so that the 'backend' pods only accept connections from 'frontend' pods. Which resource should you configure?

Direct Answer (Verified)Reviewed by Sunny (Senior Cloud Engineer)

Correct Answer: NetworkPolicy

NetworkPolicies define rules for how groups of pods are allowed to communicate with each other and other network endpoints, acting as a firewall for pods....

Real Exam ScenarioKubernetes Networking

By default, pods in a Kubernetes cluster can communicate with any other pod in any namespace. You want to restrict traffic so that the 'backend' pods only accept connections from 'frontend' pods. Which resource should you configure?

✓ Correct Answer & ExplanationKubernetes Networking

Correct Answer

NetworkPolicy

Why This Answer Is Correct

NetworkPolicies define rules for how groups of pods are allowed to communicate with each other and other network endpoints, acting as a firewall for pods.

📚 What This Question Tests

This question evaluates your knowledge of Kubernetes Networking — a core concept tested in cloud certification exams. Understanding Kubernetes Networking is essential for designing scalable, secure, and cost-effective cloud architectures. Mastery of this topic will help you answer scenario-based questions confidently on exam day.