{ "apiVersion": "networking.k8s.io/v1", "kind": "NetworkPolicy", "metadata": { "name": "worldbuilder-web", "namespace": "fc-worldbuilder" }, "spec": { "podSelector": { "matchLabels": { "app.kubernetes.io/name": "worldbuilder-web" } }, "policyTypes": [ "Ingress", "Egress" ], "ingress": [ { "from": [ { "namespaceSelector": { "matchLabels": { "kubernetes.io/metadata.name": "traefik-system" } } } ], "ports": [ { "port": 8080, "protocol": "TCP" } ] }, { "from": [ { "namespaceSelector": { "matchLabels": { "kubernetes.io/metadata.name": "monitoring" } } } ], "ports": [ { "port": 8080, "protocol": "TCP" } ] } ], "egress": [ { "to": [ { "namespaceSelector": { "matchLabels": { "kubernetes.io/metadata.name": "kube-system" } } } ], "ports": [ { "port": 53, "protocol": "UDP" }, { "port": 53, "protocol": "TCP" } ] }, { "to": [ { "ipBlock": { "cidr": "10.0.56.20/32" } } ], "ports": [ { "port": 8188, "protocol": "TCP" } ] } ] } }