Stage 6, Part 4 of 9 · p. 50, RBAC, ServiceAccounts & Security
PART 4: CAPACITY PLANNING & COST MODELING
20. Policy Engine Overhead Modeling
Webhook Overhead
| Webhook Type | Latency | Impact |
| OPA Gatekeeper | 5-50ms | Per admission |
| Kyverno | 5-30ms | Per admission |
| Custom webhook | Varies | Depends on logic |
The Admission Bottleneck
Every admission request goes through:
- Mutating webhooks
- Schema validation
- Validating admission policies
- Validating webhooks
Impact: For a cluster with 10 webhooks, each admission has ~50-200ms overhead.
Scaling Considerations
| Cluster Size | Webhook Replicas |
| < 100 nodes | 2 replicas |
| 100-500 nodes | 3-5 replicas |
| > 500 nodes | 5-10 replicas + PDB |
Overhead Mitigation
| Strategy | Impact |
| Scope webhooks narrowly | Fewer matches |
| Cache decisions | Lower latency |
| Use ValidatingAdmissionPolicy (CEL) | In-process, faster |
| Batch operations | Fewer admissions |
21. Security Tooling Cost Analysis
Runtime Security Cost
| Tool | Deployment | Cost per Node |
| Falco (self-hosted) | DaemonSet | Infrastructure only |
| Tetragon | DaemonSet | Infrastructure only |
| Datadog Security | DaemonSet | ~$30/month |
| Sysdig Secure | DaemonSet | Enterprise pricing |
| Aqua | Multiple | Enterprise pricing |
Policy Engine Cost
| Tool | Cost |
| OPA Gatekeeper | Free (open source) |
| Kyverno | Free (open source) |
| Kyverno Enterprise | Commercial |
| Styra DAS | Commercial (OPA management) |
Secrets Management Cost
| Tool | Cost |
| Kubernetes Secrets | Free |
| Sealed Secrets | Free |
| SOPS | Free (KMS costs) |
| External Secrets Operator | Free (backend costs) |
| HashiCorp Vault | OSS free / Enterprise pricing |
| AWS Secrets Manager | $0.40/secret/month + API calls |
The TCO of a Security Incident
| Incident Type | Estimated Cost |
| RBAC breach | $100K - $1M+ |
| Secret leak | $500K - $5M+ |
| Ransomware | $1M - $10M+ |
| Supply chain | $10M+ (SolarWinds scale) |
Security tooling is cheap compared to incidents.
22. SLA & Availability Design
Availability Math
text
99.9% = 8.76 hours downtime/year
99.99% = 52.56 minutes downtime/year
99.999% = 5.26 minutes downtime/year
Security SLA Design
| Target | Architecture |
| 99.9% | Basic RBAC, PSA baseline |
| 99.99% | RBAC + PSA restricted + Kyverno + Falco |
| 99.999% | Above + zero-trust, mTLS, image signing, chaos-tested |
HA for Security Components
| Component | HA Requirement |
| Webhooks | 3+ replicas, PDB |
| OPA Gatekeeper | 3+ replicas |
| Kyverno | 3+ replicas |
| Vault | 3+ node cluster |
| Audit log backend | Replicated |
1:1 copy of the class Google Doc, code in code blocks.