kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
  name: api-allow
spec:
  podSelector:
    matchLabels:
      pod: a
  ingress:
  - from:
    - podSelector:
        matchLabels:
          pod: b
