@@ -58,15 +58,17 @@ By default, a pod is non-isolated for egress; all outbound connections are allow
58
58
A pod is isolated for egress if there is any NetworkPolicy that both selects the pod and has
59
59
"Egress" in its ` policyTypes ` ; we say that such a policy applies to the pod for egress.
60
60
When a pod is isolated for egress, the only allowed connections from the pod are those allowed by
61
- the ` egress ` list of some NetworkPolicy that applies to the pod for egress.
61
+ the ` egress ` list of some NetworkPolicy that applies to the pod for egress. Reply traffic for those
62
+ allowed connections will also be implicitly allowed.
62
63
The effects of those ` egress ` lists combine additively.
63
64
64
65
By default, a pod is non-isolated for ingress; all inbound connections are allowed.
65
66
A pod is isolated for ingress if there is any NetworkPolicy that both selects the pod and
66
67
has "Ingress" in its ` policyTypes ` ; we say that such a policy applies to the pod for ingress.
67
68
When a pod is isolated for ingress, the only allowed connections into the pod are those from
68
69
the pod's node and those allowed by the ` ingress ` list of some NetworkPolicy that applies to
69
- the pod for ingress. The effects of those ` ingress ` lists combine additively.
70
+ the pod for ingress. Reply traffic for those allowed connections will also be implicitly allowed.
71
+ The effects of those ` ingress ` lists combine additively.
70
72
71
73
Network policies do not conflict; they are additive. If any policy or policies apply to a given
72
74
pod for a given direction, the connections allowed in that direction from that pod is the union of
@@ -456,6 +458,16 @@ implemented using the NetworkPolicy API.
456
458
- The ability to prevent loopback or incoming host traffic (Pods cannot currently block localhost
457
459
access, nor do they have the ability to block access from their resident node).
458
460
461
+ # # NetworkPolicy's impact on existing connections
462
+
463
+ When the set of NetworkPolicies that applies to an existing connection changes - this could happen
464
+ either due to a change in NetworkPolicies or if the relevant labels of the namespaces/pods selected by the
465
+ policy (both subject and peers) are changed in the middle of an existing connection - it is
466
+ implementation defined as to whether the change will take effect for that existing connection or not.
467
+ Example : A policy is created that leads to denying a previously allowed connection, the underlying network plugin
468
+ implementation is responsible for defining if that new policy will close the existing connections or not.
469
+ It is recommended not to modify policies/pods/namespaces in ways that might affect existing connections.
470
+
459
471
# # {{% heading "whatsnext" %}}
460
472
461
473
- See the [Declare Network Policy](/docs/tasks/administer-cluster/declare-network-policy/)
0 commit comments