Updated network-policies.md for default deny all ingress and egress traffic (#19052)

This commit is contained in:
Sujay Pillai 2020-02-12 00:14:02 +08:00 committed by GitHub
parent e5eea5d8b9
commit d57169c29a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -199,7 +199,7 @@ If you want to allow all traffic from all pods in a namespace (even if policies
You can create a "default" policy for a namespace which prevents all ingress AND egress traffic by creating the following NetworkPolicy in that namespace. You can create a "default" policy for a namespace which prevents all ingress AND egress traffic by creating the following NetworkPolicy in that namespace.
{{< codenew file="service/networking/network-policy-default-deny-egress.yaml" >}} {{< codenew file="service/networking/network-policy-default-deny-all.yaml" >}}
This ensures that even pods that aren't selected by any other NetworkPolicy will not be allowed ingress or egress traffic. This ensures that even pods that aren't selected by any other NetworkPolicy will not be allowed ingress or egress traffic.

View File

@ -1,3 +1,4 @@
---
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: NetworkPolicy kind: NetworkPolicy
metadata: metadata: