feat(coredns): restrict kube-dns-lb ingress to the internal networks #1590
@@ -0,0 +1,40 @@
|
||||
# CoreDNS is reachable from the LAN through the kube-dns-lb LoadBalancer
|
||||
# (ETP=Local, client address reaches the pod). Selecting the pods makes
|
||||
# them default-deny for ingress, so the whole cluster (pods, nodes, kubelet
|
||||
# probes, Prometheus) is allowed on every port; LAN clients only on 53.
|
||||
apiVersion: cilium.io/v2
|
||||
kind: CiliumNetworkPolicy
|
||||
metadata:
|
||||
name: coredns-ingress
|
||||
namespace: kube-system
|
||||
spec:
|
||||
endpointSelector:
|
||||
matchLabels:
|
||||
k8s-app: kube-dns
|
||||
ingress:
|
||||
- fromEntities:
|
||||
- cluster
|
||||
- fromCIDRSet:
|
||||
- cidrGroupRef: net-default
|
||||
- cidrGroupRef: net-management
|
||||
- cidrGroupRef: net-radius
|
||||
- cidrGroupRef: net-video
|
||||
- cidrGroupRef: net-iot
|
||||
- cidrGroupRef: net-server
|
||||
- cidrGroupRef: net-k8s-node
|
||||
- cidrGroupRef: net-k8s-ingress
|
||||
- cidrGroupRef: net-k8s-pod
|
||||
- cidrGroupRef: net-privat
|
||||
- cidrGroupRef: net-phone
|
||||
- cidrGroupRef: net-access
|
||||
- cidrGroupRef: net-vpn
|
||||
- cidrGroupRef: net-guest
|
||||
- cidrGroupRef: net-multi-transfer
|
||||
- cidrGroupRef: net-multi-lan
|
||||
- cidrGroupRef: net-mutti
|
||||
toPorts:
|
||||
- ports:
|
||||
- port: "53"
|
||||
protocol: UDP
|
||||
- port: "53"
|
||||
protocol: TCP
|
||||
@@ -41,3 +41,4 @@ resources:
|
||||
- allow-cilium-health.yaml
|
||||
- cnpg-barman-s3.yaml
|
||||
- kube-system-hubble-relay.yaml
|
||||
- kube-system-coredns.yaml
|
||||
|
||||
Reference in New Issue
Block a user