kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
  namespace: "x"
  name: pr-1
spec:
  egress:
    - to:
      - namespaceSelector:
          matchLabels:
            ns: "y"
        podSelector:
          matchLabels:
            pod: a
      ports:
        - port: 80
          protocol: TCP
          endPort: 103
    - ports:
        - port: 53
          protocol: UDP
  podSelector:
    matchLabels:
      pod: a
  policyTypes:
    - Egress