apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: network-policy
spec:
  podSelector: {}
  policyTypes:
    - Egress
  egress:
    - to:
        - podSelector: {}
    - to:
        - namespaceSelector: { }
          podSelector:
            matchLabels:
              k8s-app: kube-dns
      ports:
        - port: 53
          protocol: UDP
    # Apparently this means everything in cluster
    - {}
    - to:
        - ipBlock:
            cidr: 0.0.0.0/0
            except:
              - 10.1.0.1/16
