The provided Kubernetes NetworkPolicy YAML configuration indicates that the policy applies to pods with the labeltier: backendin thedefaultnamespace1.The ingress rule allows traffic from pods with the labeltier: api1.Therefore, a request issued from a pod bearing thetier: apilabel to a pod bearing thetier: backendlabel will not be blocked by this networkPolicy1.This is because the networkPolicy explicitly allows ingress from pods with thetier: apilabel1. For more information on Kubernetes Network
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit