apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: servicea-external-ingress
spec:
  podSelector:
    matchLabels:
      app: servicea
  ingress:
    - from:
      - namespaceSelector:
          matchLabels:
            kubernetes.io/metadata.name: ingress-nginx
        podSelector:
          matchLabels:
            app.kubernetes.io/name: ingress-nginx
      ports:
        - protocol: TCP
          port: 5000