Network Policy¶
Official documentation: About network policy
Basics¶
- Based on labeling or annotations
- Empty label selector match all
- Rules for allowing
- Ingress -> who can connect to this POD
- Egress -> where can this POD connect to
- Rules
- traffic is allowed unless a Network Policy selecting the POD
- traffic is denied if pod is selected in policie but none of them have any rules allowing it
- => You can only write rules that allow traffic!
- Scope: Namespace
Demo Network Policies¶
Please check