apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: restrict-ingress-egress-burnham namespace: team-burnham spec: podSelector: {} policyTypes: - Ingress - Egress ingress: - from: - namespaceSelector: matchLabels: name: team-riker ports: - protocol: TCP port: 80 egress: - to: - namespaceSelector: matchLabels: name: team-troi ports: - protocol: TCP port: 53 - protocol: UDP port: 53