Skip to content

Commit

Permalink
Corrected namespaceSelector for network policy
Browse files Browse the repository at this point in the history
Corrected namespaceSelector for intra-namespace network policy
example. The label "name" does not exist on the namespace resource
kube-system, but the label "kubernetes.io/metadata.name" does.

Signed-off-by: Lars Wefald <larwef@gmail.com>
  • Loading branch information
larwef committed Oct 30, 2024
1 parent d4d8938 commit d91254b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/security/hardening-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ spec:
- from:
- namespaceSelector:
matchLabels:
name: kube-system
kubernetes.io/metadata.name: kube-system
```

With the applied restrictions, DNS will be blocked unless purposely allowed. Below is a network policy that will allow for traffic to exist for DNS.
Expand Down

0 comments on commit d91254b

Please sign in to comment.