Stage 9, Part 3 of 9 · p. 76, Cluster Extensibility (CRDs, Controllers, Operators)

PART 3: PRODUCTION FAILURE MODES

14. Top 10 Extensibility Failures

#FailureSymptomRoot CauseFix
1Webhook outageAPI requests failWebhook down, failurePolicy: FailHA webhook, adjust policy
2CRD version mismatchObjects can't be readConversion webhook brokenFix conversion logic
3Controller crash loopNo reconciliationBug in ReconcileFix code, add retries
4Finalizer stuckObject can't be deletedCleanup failsRemove finalizer manually
5OwnerReference cycleGarbage collection failsCircular referencesFix ownership graph
6Operator OOMController killedMemory leakIncrease limits, fix leak
7CRD schema too strictValid objects rejectedOver-validationRelax schema
8Webhook timeoutSlow API callsWebhook too slowOptimize webhook
9Operator RBAC insufficientPermission deniedMissing permissionsAdd RBAC rules
10CRD storage version changeData lossStorage migration failureTest 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?

ComponentImpactSeverity
Validating webhook down (Fail)All matching API requests failSEV-1
Mutating webhook down (Fail)All matching API requests failSEV-1
Conversion webhook downCRs with multiple versions failSEV-2
Operator crash loopNo automation; existing resources remainSEV-2
CRD schema bugValid objects rejectedSEV-2
Finalizer stuckResources can't be deletedSEV-3
Operator OOMController killedSEV-2

Mitigation Strategies

StrategyImplementation
HA webhooks3+ replicas, PDB
failurePolicy: IgnoreFor non-critical webhooks
Operator resource limitsPrevent OOM
Conversion testingTest all version paths
Finalizer timeoutNever block forever

1:1 copy of the class Google Doc, code in code blocks.