Kubernetes Admission Webhook 超时的定位
创建/更新资源报 failed calling webhook ... context deadline exceeded、connection refused 或 x509 错误,API 请求被拒绝或明显变慢。
kubectl get validatingwebhookconfigurations
kubectl get mutatingwebhookconfigurations
kubectl describe validatingwebhookconfiguration <name>
kubectl get svc,endpoints -n <webhook-ns>
kubectl logs -n <webhook-ns> <pod> --tail=100
failurePolicy: Fail 让 webhook 故障放大为 API 拒绝。caBundle 与 webhook 证书匹配。timeoutSeconds,但先优化 webhook 处理逻辑。failurePolicy 改为 Ignore,随后恢复。kubectl — webhook 配置与日志openssl — 证书校验k8s 分支的 admission-webhook 页面 — 配置细节