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....
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.
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.
To securely store and inject passwords, API keys, or certificates into a Pod, which Kubernetes resource should you use?
Which Kubernetes concept acts as an identity for processes that run in a Pod, giving them access to the Kubernetes API?
You are defining a ClusterRole in Kubernetes to grant read access to secrets. However, you want to ensure this role only applies to a specific Namespace rather than the entire cluster. How should you bind this role to a ServiceAccount?
A pod needs to run with root privileges to perform system-level diagnostics. To prevent this pod from running on other nodes with unrestricted capabilities, you want to enforce that all pods in a namespace do not run as root. Which resource should you implement?