A city parking API listens on TCP 8080, but a NetworkPolicy allow rule lists protocol UDP and port 8080 for the same Pods. What happens to legitimate client traffic?
Select an answer to reveal the explanation.
Short Explanation
Think of protocol like the language on a shipping label—same street number, wrong language, and the package never gets delivered. NetworkPolicy port rules match both port and protocol, so a UDP allow does not open TCP. Your parking clients speaking TCP stay blocked until the rule says TCP.
Full Explanation
NetworkPolicy ingress and egress port entries specify both port and protocol. If an allow rule names UDP/8080 while the application accepts TCP/8080, that rule does not match client TCP flows, so under a default-deny posture those packets remain denied. Protocol is not inferred from containerPort, and kube-proxy does not rewrite UDP allows into TCP allows. Align policy protocol with the real application protocol.