apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: ipblock-test-with-selector
  namespace: kube-system
spec:
  podSelector:
    matchLabels:
      tier: frontend
  policyTypes:
  - Ingress
  ingress:
    - from:
        - ipBlock:
           cidr: 0.0.0.0/0
           except:
             - 10.0.0.0/8
      # with podSelector
          podSelector:
           matchLabels:
            tier: frontend
    -  ports:
        - port: 53
          protocol: UDP