apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: allow-web-egress-client
  namespace: np-external
spec:
  podSelector:
    matchLabels:
      role: client
  policyTypes:
  - Egress
  egress:
  - to:
    - namespaceSelector:
        matchLabels:
          kubernetes.io/metadata.name: np-demo
      podSelector:
        matchLabels:
          app: web
    ports:
    - protocol: TCP
      port: 80
