61 lines
1.4 KiB
YAML
61 lines
1.4 KiB
YAML
|
|
apiVersion: cilium.io/v2
|
||
|
|
kind: CiliumNetworkPolicy
|
||
|
|
metadata:
|
||
|
|
name: coredns
|
||
|
|
namespace: network-dns
|
||
|
|
spec:
|
||
|
|
endpointSelector:
|
||
|
|
matchLabels:
|
||
|
|
app.kubernetes.io/name: coredns
|
||
|
|
app.kubernetes.io/instance: network-dns
|
||
|
|
ingress:
|
||
|
|
- fromCIDR:
|
||
|
|
- 10.115.187.218/24
|
||
|
|
- 10.63.81.107/24
|
||
|
|
- 10.162.8.60/24
|
||
|
|
toPorts:
|
||
|
|
- ports:
|
||
|
|
- port: "53"
|
||
|
|
protocol: UDP
|
||
|
|
- port: "53"
|
||
|
|
protocol: TCP
|
||
|
|
- port: "853"
|
||
|
|
protocol: TCP
|
||
|
|
- fromEntities:
|
||
|
|
- cluster
|
||
|
|
- host
|
||
|
|
toPorts:
|
||
|
|
- ports:
|
||
|
|
- port: "53"
|
||
|
|
protocol: UDP
|
||
|
|
- port: "53"
|
||
|
|
protocol: TCP
|
||
|
|
- port: "853"
|
||
|
|
protocol: TCP
|
||
|
|
egress:
|
||
|
|
- toCIDR:
|
||
|
|
- 1.1.1.1/32
|
||
|
|
- 1.0.0.1/32
|
||
|
|
toPorts:
|
||
|
|
- ports:
|
||
|
|
- port: "53"
|
||
|
|
protocol: UDP
|
||
|
|
- port: "53"
|
||
|
|
protocol: TCP
|
||
|
|
---
|
||
|
|
apiVersion: cilium.io/v2
|
||
|
|
kind: CiliumClusterwideNetworkPolicy
|
||
|
|
metadata:
|
||
|
|
name: host-egress-network-dns-probes
|
||
|
|
spec:
|
||
|
|
nodeSelector: {}
|
||
|
|
egress:
|
||
|
|
- toEndpoints:
|
||
|
|
- matchLabels:
|
||
|
|
k8s:io.kubernetes.pod.namespace: network-dns
|
||
|
|
app.kubernetes.io/name: coredns
|
||
|
|
app.kubernetes.io/instance: network-dns
|
||
|
|
toPorts:
|
||
|
|
- ports:
|
||
|
|
- port: "853"
|
||
|
|
protocol: TCP
|