kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
  name: allow-dns
spec:
  # TODO: this should eventually apply to all pod
  # but doing so right now would active the network policy on all po
  # podSelector: {}
  
  podSelector:
    matchLabels:
      network/allow-dns: "true"
  policyTypes:
  - Egress
  egress:
    - to:
      - namespaceSelector:
          matchLabels:
            kubernetes.io/metadata.name: kube-system
        podSelector:
          matchLabels:
            k8s-app: kube-dns
