apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: velero
  namespace: velero
spec:
  podSelector:
    matchLabels:
      name: velero
  policyTypes:
    - Ingress
    - Egress
  ingress: []
  egress:
    - to:
        - namespaceSelector:
            matchLabels:
              kubernetes.io/metadata.name: kube-system
          podSelector:
            matchLabels:
              k8s-app: kube-dns
      ports:
        - port: 53
          protocol: UDP
    - to:
        - ipBlock:
            cidr: 0.0.0.0/0
      ports:
        - port: 443
