Blast-radius demo¶
The blast-radius demo creates a small multi-namespace graph that demonstrates the core KBeacon question:
If this Secret changes, what workloads are affected?
What the demo creates¶
| Object | Namespace | Purpose |
|---|---|---|
| Secret/payments-db | payments | Shared database credential. |
| Secret/stripe-api | payments | Payment provider credential. |
| Secret/platform-ca | shared | Shared certificate bundle reference. |
| Deployment/payments-api | payments | Hybrid discovery. |
| Deployment/checkout-worker | payments | Inferred discovery. |
| Deployment/reports-api | reports | Explicit discovery. |
| Secret/legacy-payment-token | payments | Intentionally missing unresolved reference. |
Apply the demo¶
./examples/demo-blast-radius/run.sh apply
Verify demo resources¶
./examples/demo-blast-radius/run.sh status
Query KBeacon¶
Port-forward the Agent API:
Query the blast radius for the main Secret:
kbeacon impact --format json payments payments-db | jq ".data"
Expected result:
- affected workloads include payments-api, checkout-worker, and reports-api;
- affected teams include payments-platform, checkout, and data-platform;
- affected namespaces include payments and reports.
Query the intentionally unresolved Secret:
kbeacon impact --format json payments legacy-payment-token | jq ".data.secret"
Expected result:
- exists is false;
- unresolvedReferenceCount is greater than zero.
Query workload dependencies:
kbeacon dependencies payments Deployment payments-api | jq ".data.dependencies"
Prometheus checks¶
kbeacon_secret_affected_workload_count{namespace="payments",secret_name="payments-db"}
kbeacon_unresolved_secret_references{namespace="payments",secret_name="legacy-payment-token"}
kbeacon_dependency_edges{workload_namespace="payments",workload_name="payments-api"}
Delete the demo¶
./examples/demo-blast-radius/run.sh delete
Verified demo output¶
The demo was validated against a live KBeacon Agent through the local port-forwarded API.
Timestamps and Kubernetes UIDs are intentionally not documented because they are generated by the cluster. Global dependency-map totals can also vary if the cluster contains workloads outside this demo.
| Query | Expected result |
|---|---|
payments/payments-db impact |
exists=true, affectedWorkloadCount=3, affectedTeamCount=3, affectedNamespaceCount=2, unresolvedReferenceCount=0, impactScore=46 |
payments/payments-db discovery modes |
{"explicit": 1, "infer": 2} |
payments/legacy-payment-token impact |
exists=false, affectedWorkloadCount=1, unresolvedReferenceCount=1, impactScore=38 |
payments/legacy-payment-token discovery modes |
{"explicit": 1} |
Deployment/payments-api dependencies |
dependencyCount=3, unresolvedCount=1 |
| Global dependency map sample | nodes=30, edges=10 |
Expected Deployment/payments-api dependencies:
| Secret | Resolved | Discovery mode |
|---|---|---|
payments/legacy-payment-token |
false |
explicit |
payments/payments-db |
true |
infer |
shared/platform-ca |
true |
explicit |
The important behavior is that payments/payments-db is resolved and high-impact, while payments/legacy-payment-token is intentionally unresolved but still visible in the graph.
Verified metrics output¶
The blast-radius demo can also be validated through the Agent /metrics endpoint.
Run:
make demo-metrics-live
The validation script applies the demo resources, opens a temporary port-forward to the Agent, downloads /metrics, and checks these expected values:
| Metric | Labels | Expected value |
|---|---|---|
kbeacon_secret_affected_workload_count |
namespace="payments", secret_name="payments-db", exists="true" |
3 |
kbeacon_secret_impact_score |
namespace="payments", secret_name="payments-db", exists="true" |
46 |
kbeacon_secret_affected_workload_count |
namespace="payments", secret_name="legacy-payment-token", exists="false" |
1 |
kbeacon_secret_impact_score |
namespace="payments", secret_name="legacy-payment-token", exists="false" |
38 |
kbeacon_unresolved_secret_references |
namespace="payments", secret_name="legacy-payment-token" |
1 |
kbeacon_workload_dependency_count |
namespace="payments", workload_name="payments-api" |
3 |
kbeacon_dependency_edges |
workload_namespace="payments", workload_name="payments-api", secret_name="legacy-payment-token", resolved="false" |
1 |
The expected metric summary is stored in examples/demo-blast-radius/expected-metrics.json.