{
  "id": "kubernetes/coredns-loop-detected",
  "signature": "plugin/loop: Loop (127.0.0.1:53) detected for zone \".\", see https://coredns.io/plugins/loop#troubleshooting",
  "signature_zh": "插件/循环：检测到区域 \".\" 的循环（127.0.0.1:53），请参阅 https://coredns.io/plugins/loop#troubleshooting",
  "regex": "plugin/loop: Loop \\([0-9.]+:[0-9]+\\) detected for zone",
  "domain": "kubernetes",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "CoreDNS is forwarding DNS queries to itself, creating a loop, usually because the node's /etc/resolv.conf points to localhost or the pod's DNS policy misconfigures upstream.",
  "root_cause_type": "generic",
  "root_cause_zh": "CoreDNS 将 DNS 查询转发给自己，造成循环，通常是因为节点的 /etc/resolv.conf 指向 localhost 或 Pod 的 DNS 策略配置了错误的上游。",
  "versions": [
    {
      "version": "coredns 1.8.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "coredns 1.9.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "coredns 1.10.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "kubernetes 1.22",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "kubernetes 1.24",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Delete the CoreDNS pod and let it restart.",
      "why_fails": "The loop is caused by configuration, not a transient state; restarting will not fix the underlying issue.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "Set the node's /etc/resolv.conf to use a public DNS like 8.8.8.8.",
      "why_fails": "This may break cluster-internal DNS resolution for services and pods.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Edit the CoreDNS ConfigMap (kube-system/coredns) to add the `loop` plugin and set a proper upstream DNS. For example, ensure the forward directive points to a valid external DNS (e.g., `forward . /etc/resolv.conf`) and not to localhost.",
      "success_rate": 0.9,
      "how": "Edit the CoreDNS ConfigMap (kube-system/coredns) to add the `loop` plugin and set a proper upstream DNS. For example, ensure the forward directive points to a valid external DNS (e.g., `forward . /etc/resolv.conf`) and not to localhost.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Check the node's /etc/resolv.conf for nameserver entries pointing to 127.0.0.1 or loopback addresses. If found, change them to a valid DNS server IP (e.g., 8.8.8.8) and restart kubelet.",
      "success_rate": 0.85,
      "how": "Check the node's /etc/resolv.conf for nameserver entries pointing to 127.0.0.1 or loopback addresses. If found, change them to a valid DNS server IP (e.g., 8.8.8.8) and restart kubelet.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "编辑 CoreDNS ConfigMap（kube-system/coredns）以添加 `loop` 插件并设置正确的上游 DNS。例如，确保 forward 指令指向有效的外部 DNS（例如 `forward . /etc/resolv.conf`），而不是 localhost。",
    "检查节点的 /etc/resolv.conf 中是否有指向 127.0.0.1 或回环地址的 nameserver 条目。如果有，将其更改为有效的 DNS 服务器 IP（例如 8.8.8.8）并重启 kubelet。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://coredns.io/plugins/loop/",
  "official_doc_section": null,
  "error_code": "K8S-DNS-003",
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-04-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}