apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
  name: allow-namespace-traffic
  namespace: kube-system
spec:
  description: Allow Namespace Traffic
  egress:
    - toEndpoints:
        - {}
    - toEndpoints:
        - matchLabels:
            io.kubernetes.pod.namespace: kube-system
            k8s-app: kube-dns
      toPorts:
        - ports:
            - port: "53"
              protocol: UDP
          rules:
            dns:
              - matchPattern: '*'
  endpointSelector:
    matchLabels: {}
  ingress:
    - fromEndpoints:
        - {}
