mirror of
https://github.com/JamesTurland/JimsGarage.git
synced 2025-10-03 00:46:18 +00:00
add networkpolicies
This commit is contained in:
17
Kubernetes/NetworkPolicies/namespace-example.yaml
Normal file
17
Kubernetes/NetworkPolicies/namespace-example.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: egress-namespaces
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: myapp
|
||||
policyTypes:
|
||||
- Egress
|
||||
egress:
|
||||
- to:
|
||||
- namespaceSelector:
|
||||
matchExpressions:
|
||||
- key: namespace
|
||||
operator: In
|
||||
values: ["frontend", "backend"]
|
Reference in New Issue
Block a user