apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: secure-north-south
spec:
  podSelector:
    matchLabels:
      app.kubernetes.io/name: shellshockable
      app.kubernetes.io/instance: vuln-bash
  policyTypes:
    - Egress
  egress:
    - to:
        - namespaceSelector: {}
          podSelector:
            matchLabels:
              k8s-app: kube-dns
      ports:
        - port: 53
          protocol: UDP
