For a 3-tier app in one namespace, db Pods should accept TCP 5432 only from Pods labeled tier=api, not from tier=web. Which NetworkPolicy approach fits?
Select an answer to reveal the explanation.
Short Explanation
Picture the database as a vault that only the API desk can open—not the public web lobby. Put the NetworkPolicy on the db Pods and allow ingress from tier=api on 5432. Leave web out of that allow list and they stay outside.
Full Explanation
Tiered isolation is expressed by selecting the protected Pods (here, database) and listing only the intended peer podSelectors (api) on the allowed ports. Allowing the whole namespace would also admit web. Egress denies on web do not replace precise db ingress allows, and ExternalName Services are unrelated to SQL peer filtering inside the cluster.