Skip to content

Network segmentation

A profile’s network_topology block drives NetworkPolicy generation and validation. Each map key names the workload the entry applies to.

An entry declares who may reach a workload and where it may reach out:

network_topology:
unguard-mariadb:
allowed_ingress_from: # omit to leave ingress undeclared;
- {app.kubernetes.io/name: like-service} # an empty list blocks all ingress
unguard-proxy-service:
allowed_egress_to: # destinations outside the namespace
- cidr: 0.0.0.0/0
except: [10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.169.254/32]
ports: [80, 443]
protocol: TCP

allowed_ingress_from lists the pod label selectors permitted to send ingress. allowed_egress_to lists external destinations by CIDR, with except ranges carved out, plus ports and protocol. Nothing is inferred: a destination that is not declared is not permitted. A workload with an external dependency needs allowed_egress_to, or a default-deny set severs it while every in-namespace flow still passes.

kimera validate-control --type network-policy deploys a short-lived probe pod and tests pod-to-pod connectivity against what the policies should allow. The CLI applies the profile’s network_topology, so declared external egress is part of the check.

Terminal window
kimera -n target-namespace validate-control --type network-policy

A namespace-wide policy set constrains every pod. To scope a set to one exploited workload, feed its findings back:

Terminal window
kimera -n target-namespace exploit missing-network-policies --json > findings.json
kimera -n target-namespace generate --from-findings findings.json

Targeted scope emits policies for the findings’ source workload only. The remediation scope page describes how each observed path is classified and what the deterministic pass corrects.

All product names and logos are trademarks of their respective owners, used for identification only. No endorsement is implied.