{
  "id": "kubernetes/webhook-invalid-certificate",
  "signature": "Error from server (InternalError): error when creating \"pod.yaml\": Internal error occurred: failed calling webhook \"pod-validator.example.com\": failed to call webhook: Post \"https://webhook-service.namespace.svc:443/validate\": x509: certificate is valid for *.example.com, not webhook-service.namespace.svc",
  "signature_zh": "来自服务器的错误（内部错误）：创建 \"pod.yaml\" 时出错：发生内部错误：调用 webhook \"pod-validator.example.com\" 失败：调用 webhook 失败：Post \"https://webhook-service.namespace.svc:443/validate\"：x509：证书对 *.example.com 有效，但对 webhook-service.namespace.svc 无效",
  "regex": "x509: certificate is valid for [^,]+ not [^ ]+",
  "domain": "kubernetes",
  "category": "auth_error",
  "subcategory": null,
  "root_cause": "The TLS certificate used by the admission webhook server does not include the Kubernetes service DNS name (e.g., webhook-service.namespace.svc) in its SAN, causing the API server to reject the connection.",
  "root_cause_type": "generic",
  "root_cause_zh": "准入 webhook 服务器使用的 TLS 证书未在 SAN 中包含 Kubernetes 服务 DNS 名称（例如 webhook-service.namespace.svc），导致 API 服务器拒绝连接。",
  "versions": [
    {
      "version": "Kubernetes 1.25",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Kubernetes 1.28",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "cert-manager 1.12",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Disabling TLS verification in the webhook configuration (`insecureSkipTLSVerify: true`) bypasses security but is not recommended for production.",
      "fail_rate": 0.3,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Recreating the webhook deployment without regenerating the certificate will produce the same error.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Regenerate the TLS certificate with the correct SANs including the Kubernetes service DNS name. Using cert-manager, create a Certificate resource with `dnsNames: [\"webhook-service.namespace.svc\", \"webhook-service.namespace.svc.cluster.local\"]`.",
      "success_rate": 0.9,
      "how": "Regenerate the TLS certificate with the correct SANs including the Kubernetes service DNS name. Using cert-manager, create a Certificate resource with `dnsNames: [\"webhook-service.namespace.svc\", \"webhook-service.namespace.svc.cluster.local\"]`.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Alternatively, update the webhook configuration to use a different service name that matches the certificate's SAN, but this is less common.",
      "success_rate": 0.7,
      "how": "Alternatively, update the webhook configuration to use a different service name that matches the certificate's SAN, but this is less common.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Regenerate the TLS certificate with the correct SANs including the Kubernetes service DNS name. Using cert-manager, create a Certificate resource with `dnsNames: [\"webhook-service.namespace.svc\", \"webhook-service.namespace.svc.cluster.local\"]`.",
    "Alternatively, update the webhook configuration to use a different service name that matches the certificate's SAN, but this is less common."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#configure-admission-webhook-tls",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2024-04-12",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}