mirror of
https://github.com/gwg313/homelab-gitops.git
synced 2026-06-06 00:41:01 +00:00
30 lines
590 B
YAML
30 lines
590 B
YAML
apiVersion: cilium.io/v2
|
|
kind: CiliumNetworkPolicy
|
|
metadata:
|
|
name: kube-system-restrict-external-egress
|
|
namespace: kube-system
|
|
spec:
|
|
endpointSelector: {}
|
|
|
|
egress:
|
|
# Allow Kubernetes API
|
|
- toEntities:
|
|
- kube-apiserver
|
|
|
|
# Allow internal cluster communication
|
|
- toEntities:
|
|
- cluster
|
|
- host
|
|
- remote-node
|
|
|
|
# Allow DNS
|
|
- toEndpoints:
|
|
- matchLabels:
|
|
k8s:k8s-app: kube-dns
|
|
toPorts:
|
|
- ports:
|
|
- port: "53"
|
|
protocol: UDP
|
|
- port: "53"
|
|
protocol: TCP
|
|
|