Stage 9, Part 3 of 9, Cluster Extensibility (CRDs, Controllers, Operators)
Text
PART 3: PRODUCTION FAILURE MODES
14. Top 10 Extensibility Failures
| # | Failure | Symptom | Root Cause | Fix |
| 1 | Webhook outage | API requests fail | Webhook down, failurePolicy: Fail | HA webhook, adjust policy |
| 2 | CRD version mismatch | Objects can't be read | Conversion webhook broken | Fix conversion logic |
| 3 | Controller crash loop | No reconciliation | Bug in Reconcile | Fix code, add retries |
| 4 | Finalizer stuck | Object can't be deleted | Cleanup fails | Remove finalizer manually |
| 5 | OwnerReference cycle | Garbage collection fails | Circular references | Fix ownership graph |
| 6 | Operator OOM | Controller killed | Memory leak | Increase limits, fix leak |
| 7 | CRD schema too strict | Valid objects rejected | Over-validation | Relax schema |
| 8 | Webhook timeout | Slow API calls | Webhook too slow | Optimize webhook |
| 9 | Operator RBAC insufficient | Permission denied | Missing permissions | Add RBAC rules |
| 10 | CRD storage version change | Data loss | Storage migration failure | Test migration |
15. Extensibility Debugging Runbook
"Operator is Broken" — Step-by-Step
text
STEP 1: Check operator pods
$ kubectl get pods -n <operator-namespace>
STEP 2: Check operator logs
$ kubectl logs -n <operator-namespace> <operator-pod>
$ kubectl logs -n <operator-namespace> <operator-pod> --previous
STEP 3: Check CRD status
$ kubectl get crd <crd-name>
$ kubectl describe crd <crd-name>
STEP 4: Check custom resources
$ kubectl get <plural> -A
$ kubectl describe <kind> <name>
STEP 5: Check webhooks
$ kubectl get validatingwebhookconfigurations
$ kubectl get mutatingwebhookconfigurations
$ kubectl describe validatingwebhookconfiguration <name>
STEP 6: Check webhook service
$ kubectl get svc -n <webhook-namespace> <webhook-service>
$ kubectl get endpoints -n <webhook-namespace> <webhook-service>
STEP 7: Check RBAC
$ kubectl auth can-i --list --as=system:serviceaccount:<ns>:<sa>
STEP 8: Check events
$ kubectl get events -A --sort-by=.metadata.creationTimestamp
STEP 9: Check conversion (if multi-version)
$ kubectl get crd <crd-name> -o yaml | grep -A10 conversion
STEP 10: Escalate
16. Blast Radius Analysis
What Happens When Extensibility Fails?
| Component | Impact | Severity |
| Validating webhook down (Fail) | All matching API requests fail | SEV-1 |
| Mutating webhook down (Fail) | All matching API requests fail | SEV-1 |
| Conversion webhook down | CRs with multiple versions fail | SEV-2 |
| Operator crash loop | No automation; existing resources remain | SEV-2 |
| CRD schema bug | Valid objects rejected | SEV-2 |
| Finalizer stuck | Resources can't be deleted | SEV-3 |
| Operator OOM | Controller killed | SEV-2 |
Mitigation Strategies
| Strategy | Implementation |
| HA webhooks | 3+ replicas, PDB |
| failurePolicy: Ignore | For non-critical webhooks |
| Operator resource limits | Prevent OOM |
| Conversion testing | Test all version paths |
| Finalizer timeout | Never block forever |
1:1 copy of the class Google Doc, code in code blocks.