apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: test-network-policy
  namespace: api
spec:
  podSelector: {}
  policyTypes:
  - Ingress
  ingress:
  - from:
    - namespaceSelector:
        matchLabels:
          name: web  
    - namespaceSelector:
        matchLabels:
          name: ingress-basic     
    ports:
    - protocol: TCP
      port: 80