apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: default
  namespace: dynamic
spec:
  egress:
    - ports:
        - port: 53
          protocol: TCP
        - port: 53
          protocol: UDP
      to:
        - namespaceSelector:
            matchLabels:
              name: kube-system
          podSelector:
            matchLabels:
              k8s-app: kube-dns
    - to:
        - ipBlock:
            cidr: 0.0.0.0/0
            except:
              - 10.0.0.0/8
              - 172.0.0.0/12
              - 192.0.0.0/16
        - namespaceSelector:
            matchLabels:
              name: static
          podSelector:
            matchLabels:
              app: api
        - namespaceSelector:
            matchLabels:
              name: static
          podSelector:
            matchLabels:
              app: docker-registry
        - namespaceSelector:
            matchLabels:
              name: static
          podSelector:
            matchLabels:
              app.kubernetes.io/name: ingress-nginx
        - namespaceSelector:
            matchLabels:
              name: static
          podSelector:
            matchLabels:
              app: minio
        - namespaceSelector:
            matchLabels:
              name: static
          podSelector:
            matchLabels:
              app: wss
  podSelector: {}
  policyTypes:
    - Egress
