mirror of
https://github.com/gwg313/homelab-gitops.git
synced 2026-06-05 21:51:00 +00:00
40 lines
887 B
YAML
40 lines
887 B
YAML
apiVersion: cilium.io/v2
|
|
kind: CiliumNetworkPolicy
|
|
metadata:
|
|
name: kube-system-hardening
|
|
namespace: kube-system
|
|
spec:
|
|
endpointSelector: {}
|
|
|
|
ingress:
|
|
# Allow cluster-internal communication (required for DNS, CNI, etc.)
|
|
- fromEntities:
|
|
- cluster
|
|
- host
|
|
- remote-node
|
|
|
|
# Allow kube-apiserver to talk to system components
|
|
- fromEntities:
|
|
- kube-apiserver
|
|
|
|
egress:
|
|
# Core dependency: Kubernetes API
|
|
- toEntities:
|
|
- kube-apiserver
|
|
|
|
# CoreDNS access
|
|
- toEndpoints:
|
|
- matchLabels:
|
|
k8s:k8s-app: kube-dns
|
|
toPorts:
|
|
- ports:
|
|
- port: "53"
|
|
protocol: UDP
|
|
- port: "53"
|
|
protocol: TCP
|
|
|
|
# Allow internal cluster communication (important for CNI + service mesh)
|
|
- toEntities:
|
|
- cluster
|
|
- host
|
|
- remote-node
|