``` apiVersion: <http://networking.k8s.io/v1|networking.k8s.io/v1> kind: Networ . . .

Ceci Ivanov:

apiVersion: <http://networking.k8s.io/v1|networking.k8s.io/v1>
kind: NetworkPolicy
metadata:
  name: foo-deny-external-egress
spec:
  podSelector:
    matchLabels:
      app: foo
  policyTypes:
  - Egress
  egress:
  - ports:
    - port: 53
      protocol: UDP
    - port: 53
      protocol: TCP
  - to:
    - namespaceSelector: {}

what does mean the None NameSpace Selector?

Alistair Mackay:
What you have here is a policy that permits traffic on port 53 to anywhere inside the cluster.

namespaceSelector: {}

means all namespaces

Alistair Mackay:
but not external

Alistair Mackay:
Visualize network policies by uploading them to https://editor.cilium.io/