{
  "id": "kubernetes/ingress-annotation-invalid",
  "signature": "Error: Ingress.networking.k8s.io \"my-ingress\" is invalid: metadata.annotations: Invalid value: \"nginx.ingress.kubernetes.io/rewrite-target\": must be a valid annotation for the ingress controller",
  "signature_zh": "错误：Ingress.networking.k8s.io \"my-ingress\" 无效：metadata.annotations：无效值：\"nginx.ingress.kubernetes.io/rewrite-target\"：必须是 Ingress 控制器的有效注解",
  "regex": "Error: Ingress\\.networking\\.k8s\\.io.*is invalid: metadata\\.annotations: Invalid value: .*must be a valid annotation for the ingress controller",
  "domain": "kubernetes",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "An annotation used in the Ingress resource is not recognized or supported by the configured ingress controller (e.g., Nginx Ingress Controller).",
  "root_cause_type": "generic",
  "root_cause_zh": "Ingress 资源中使用的注解不被配置的 Ingress 控制器（例如 Nginx Ingress Controller）识别或支持。",
  "versions": [
    {
      "version": "kubernetes 1.27",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "nginx-ingress 1.8",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "nginx-ingress 1.9",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Additional invalid annotations will only cause more validation errors, not fix the original one.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The annotation is validated at resource creation time by the API server, not by the controller at runtime.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Guessing annotation names often leads to typos or unsupported keys, causing the same error.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Check the official annotation list for Nginx Ingress Controller at https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/. For example, correct `nginx.ingress.kubernetes.io/rewrite-target` to `nginx.ingress.kubernetes.io/rewrite-target` (if misspelled) or use a supported annotation like `nginx.ingress.kubernetes.io/ssl-redirect: \"true\"`.",
      "success_rate": 0.95,
      "how": "Check the official annotation list for Nginx Ingress Controller at https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/. For example, correct `nginx.ingress.kubernetes.io/rewrite-target` to `nginx.ingress.kubernetes.io/rewrite-target` (if misspelled) or use a supported annotation like `nginx.ingress.kubernetes.io/ssl-redirect: \"true\"`.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Edit the Ingress YAML and delete the invalid annotation line(s). Then reapply: `kubectl apply -f ingress.yaml`.",
      "success_rate": 0.85,
      "how": "Edit the Ingress YAML and delete the invalid annotation line(s). Then reapply: `kubectl apply -f ingress.yaml`.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "在 https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/ 查看 Nginx Ingress Controller 的官方注解列表。例如，将 `nginx.ingress.kubernetes.io/rewrite-target` 更正为正确的拼写，或使用支持的注解如 `nginx.ingress.kubernetes.io/ssl-redirect: \"true\"`。",
    "编辑 Ingress YAML 并删除无效的注解行。然后重新应用：`kubectl apply -f ingress.yaml`。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.86,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2024-02-14",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}