mirror of
https://github.com/JamesTurland/JimsGarage.git
synced 2025-10-03 00:46:18 +00:00
add networkpolicies
This commit is contained in:
20
Kubernetes/NetworkPolicies/port-example.yaml
Normal file
20
Kubernetes/NetworkPolicies/port-example.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: multi-port-egress
|
||||
namespace: default
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
role: db
|
||||
policyTypes:
|
||||
- Egress
|
||||
egress:
|
||||
- to:
|
||||
- ipBlock:
|
||||
cidr: 10.0.0.0/24
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 32000
|
||||
endPort: 32768
|
||||
|
Reference in New Issue
Block a user