apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
 name: allow-dev-stage
 namespace: my-app-dev
spec:
 # 1)
 podSelector: {}
  # 2)
 ingress:
 - from:
   - namespaceSelector:
       matchLabels:
         stage: dev
  # 3)  
 egress:
 - to:
   - namespaceSelector:
       matchLabels:
         stage: dev
 - ports:
   - port: 53
     protocol: "UDP"
   - port: 53
     protocol: "TCP"