Add NetworkPolicies

This commit is contained in:
Adrien Reslinger 2020-05-01 01:32:18 +02:00
parent 07283a2243
commit 63318b11b9
4 changed files with 39 additions and 5 deletions

View file

@ -0,0 +1,19 @@
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-from-namespaces
namespace: kubernetes-dashboard
spec:
podSelector: {}
ingress:
- from:
- podSelector: {}
- from:
- namespaceSelector:
matchLabels:
namespace: tools
podSelector:
matchLabels:
app: traefik
policyTypes:
- Ingress

View file

@ -0,0 +1,10 @@
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny-all
namespace: kubernetes-dashboard
spec:
podSelector: {}
policyTypes:
- Ingress
- Egress