91 lines
1.5 KiB
YAML
91 lines
1.5 KiB
YAML
|
---
|
||
|
apiVersion: networking.k8s.io/v1
|
||
|
kind: NetworkPolicy
|
||
|
metadata:
|
||
|
name: kubedns
|
||
|
spec:
|
||
|
podSelector: {}
|
||
|
policyTypes:
|
||
|
- Egress
|
||
|
egress:
|
||
|
- to:
|
||
|
- namespaceSelector:
|
||
|
matchLabels:
|
||
|
kubernetes.io/metadata.name: kube-system
|
||
|
ports:
|
||
|
- protocol: UDP
|
||
|
port: 53
|
||
|
- protocol: TCP
|
||
|
port: 53
|
||
|
---
|
||
|
apiVersion: networking.k8s.io/v1
|
||
|
kind: NetworkPolicy
|
||
|
metadata:
|
||
|
name: kubeprobe
|
||
|
spec:
|
||
|
podSelector: {}
|
||
|
policyTypes:
|
||
|
- Ingress
|
||
|
ingress:
|
||
|
- from:
|
||
|
- ipBlock:
|
||
|
cidr: 10.244.0.1/32
|
||
|
- from:
|
||
|
- ipBlock:
|
||
|
cidr: 10.244.1.1/32
|
||
|
- from:
|
||
|
- ipBlock:
|
||
|
cidr: 10.244.2.1/32
|
||
|
- from:
|
||
|
- ipBlock:
|
||
|
cidr: 10.244.9.1/32
|
||
|
- from:
|
||
|
- ipBlock:
|
||
|
cidr: 10.244.4.1/32
|
||
|
- from:
|
||
|
- ipBlock:
|
||
|
cidr: 10.244.3.1/32
|
||
|
- from:
|
||
|
- ipBlock:
|
||
|
cidr: 10.244.5.1/32
|
||
|
- from:
|
||
|
- ipBlock:
|
||
|
cidr: 10.244.7.1/32
|
||
|
- from:
|
||
|
- ipBlock:
|
||
|
cidr: 10.244.11.1/32
|
||
|
- from:
|
||
|
- ipBlock:
|
||
|
cidr: 10.244.12.1/32
|
||
|
- from:
|
||
|
- ipBlock:
|
||
|
cidr: 10.244.6.1/32
|
||
|
- from:
|
||
|
- ipBlock:
|
||
|
cidr: 10.244.10.1/32
|
||
|
- from:
|
||
|
- ipBlock:
|
||
|
cidr: 10.244.8.1/32
|
||
|
- from:
|
||
|
- ipBlock:
|
||
|
cidr: 10.244.13.1/32
|
||
|
---
|
||
|
apiVersion: networking.k8s.io/v1
|
||
|
kind: NetworkPolicy
|
||
|
metadata:
|
||
|
name: kubeapi
|
||
|
spec:
|
||
|
podSelector: {}
|
||
|
policyTypes:
|
||
|
- Egress
|
||
|
egress:
|
||
|
- ports:
|
||
|
- port: 6443
|
||
|
to:
|
||
|
- ipBlock:
|
||
|
cidr: 172.21.3.51/32
|
||
|
- ipBlock:
|
||
|
cidr: 172.21.3.52/32
|
||
|
- ipBlock:
|
||
|
cidr: 172.21.3.53/32
|