Last active
September 9, 2021 12:32
-
-
Save nelvadas/589fabb2f8651d34840b5b4c32ada196 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: NetworkPolicy | |
apiVersion: networking.k8s.io/v1 | |
metadata: | |
namespace: server-ns | |
name: allow-client-ns | |
spec: | |
podSelector: | |
matchLabels: {} | |
ingress: | |
- from: | |
- namespaceSelector: | |
matchLabels: | |
role: client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: NetworkPolicy | |
apiVersion: networking.k8s.io/v1 | |
metadata: | |
namespace: server-ns | |
name: same-ns-policy | |
spec: | |
podSelector: | |
matchLabels: | |
role: server-pod | |
ingress: | |
- from: | |
- podSelector: | |
matchLabels: | |
run: tmp-shell | |
ports: | |
- protocol: TCP | |
port: 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment