apiVersion: networking.k8s.io/v1 
kind: NetworkPolicy
metadata:
  name: policy1 
  namespace: dev 
spec:
  podSelector:
    matchLabels:
      app: webserver-dev 
  policyTypes:
  - Ingress
  - Egress 
  ingress:
  - from:
    - ipBlock:
        cidr: 10.169.25.20/32
    - namespaceSelector:
        matchLabels:
          project: jtac
    - podSelector:
        matchLabels:
          app: client1-dev 
    ports:
    - protocol: TCP 
      port: 80
  egress:
  - to:
    - podSelector:
        matchLabels:
          app: dbserver-dev 
    ports:
    - protocol: TCP 
      port: 80
