How can you restrict Pod communication so that 'frontend' pods can only talk to 'backend' pods on port 8080?

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

Correct Answer: By using a NetworkPolicy

A NetworkPolicy is a specification of how groups of pods are allowed to communicate with each other and other network endpoints....

Real Exam ScenarioKubernetes Security

How can you restrict Pod communication so that 'frontend' pods can only talk to 'backend' pods on port 8080?

✓ Correct Answer & ExplanationKubernetes Security

Correct Answer

By using a NetworkPolicy

Why This Answer Is Correct

A NetworkPolicy is a specification of how groups of pods are allowed to communicate with each other and other network endpoints.

📚 What This Question Tests

This question evaluates your knowledge of Kubernetes Security — a core concept tested in cloud certification exams. Understanding Kubernetes Security 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.