apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: policy-from1-to2
  namespace: default
spec:
  podSelector:
    matchLabels:
      app: app-2
  policyTypes:
    - Ingress
  ingress:
    - from:
      - podSelector:
          matchLabels:
            app: app-1
