From d57169c29a0c586bcb68b8f6f9535c288f9372c4 Mon Sep 17 00:00:00 2001 From: Sujay Pillai Date: Wed, 12 Feb 2020 00:14:02 +0800 Subject: [PATCH] Updated network-policies.md for default deny all ingress and egress traffic (#19052) --- .../en/docs/concepts/services-networking/network-policies.md | 2 +- .../service/networking/network-policy-default-deny-all.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/content/en/docs/concepts/services-networking/network-policies.md b/content/en/docs/concepts/services-networking/network-policies.md index 989e319920..71f53b554e 100644 --- a/content/en/docs/concepts/services-networking/network-policies.md +++ b/content/en/docs/concepts/services-networking/network-policies.md @@ -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. -{{< 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. diff --git a/content/en/examples/service/networking/network-policy-default-deny-all.yaml b/content/en/examples/service/networking/network-policy-default-deny-all.yaml index 589f15eb3e..5c0086bd71 100644 --- a/content/en/examples/service/networking/network-policy-default-deny-all.yaml +++ b/content/en/examples/service/networking/network-policy-default-deny-all.yaml @@ -1,3 +1,4 @@ +--- apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: