The Kubernetes yaml shown below describes a networkPolicy.
Will the networkPolicy BLOCK this traffic?
Solution: a request issued from a pod lacking the tier: api label, to a pod bearing the tier: backend label
A . Yes
B . No
Answer: A
Explanation:
The networkPolicy shown in the image is designed to block traffic from pods lacking the tier: api
label, to pods bearing the tier: backend label. This is because the policy is set to matchLabels: tier: backend, and the ingress is set to – from: podSelector: matchLabels: tier: api. Therefore, any traffic that does not match these labels will be blocked.
Reference: Isolate containers with a user namespace | Docker Docs
The mnt namespace – Docker Cookbook – Second Edition
Container security fundamentals part 2: Isolation & namespaces
I hope this helps you understand the concept of networkPolicy and how it works with Kubernetes. If you have any other questions related to Docker, please feel free to ask me.
Latest DCA Dumps Valid Version with 55 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund