gpt4 book ai didi

kubernetes - EKS : can't resolve DNS (but can ping IP) 中的 Pod

转载 作者:行者123 更新时间:2023-12-02 12:29:49 24 4
gpt4 key购买 nike

我有 2 个 EKS 集群,位于 2 个不同的 AWS 账户中,并且我可能假设有不同的防火墙(我无权访问)。第一个(Dev)没问题,但是,在相同的配置下,UAT 集群 pod 正在努力解析 DNS。节点可以解决并且似乎没问题。

1) ping 8.8.8.8 有效

--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3003ms

2)我可以ping google(和其他人)的IP,但不能ping 实际的dns 名称。

我们的配置:
  • 配置了 Terraform。
  • 工作节点和控制平面 SG 与开发节点相同。我相信这些都很好。
  • 在入站 + 出站 NACl 上添加了 53 TCP 和 53 UDP(只是为了确保 53 真的打开了......)。添加了从工作节点出站的 53 个 TCP 和 53 个 UDP。
  • 我们正在使用 ami-059c6874350e63ca9 1.14 kubernetes 版本。

  • 我不确定问题是某处的防火墙、coredns、我需要更新的配置还是“愚蠢的错误”。任何帮助,将不胜感激。

    最佳答案

    请注意,此问题可能以多种形式出现(例如,DNS 无法解析只是一种可能的情况)。 terraform-awk-eks模块公开一个 terraform 输入以创建允许这些工作组/节点组间通信的必要安全组规则:worker_create_cluster_primary_security_group_rules .此 terraform-awk-eks 中的更多信息问题 https://github.com/terraform-aws-modules/terraform-aws-eks/issues/1089
    启用输入后,terraform 会创建以下安全组规则:

      # module.eks.module.eks.aws_security_group_rule.cluster_primary_ingress_workers[0] will be created                                                                                                                                                                                                                           
    + resource "aws_security_group_rule" "cluster_primary_ingress_workers" {
    + description = "Allow pods running on workers to send communication to cluster primary security group (e.g. Fargate pods)."
    + from_port = 0
    + id = (known after apply)
    + protocol = "-1"
    + security_group_id = "sg-03bb33d3318e4aa03"
    + self = false
    + source_security_group_id = "sg-0fffc4d49a499a1d8"
    + to_port = 65535
    + type = "ingress"
    }

    # module.eks.module.eks.aws_security_group_rule.workers_ingress_cluster_primary[0] will be created
    + resource "aws_security_group_rule" "workers_ingress_cluster_primary" {
    + description = "Allow pods running on workers to receive communication from cluster primary security group (e.g. Fargate pods)."
    + from_port = 0
    + id = (known after apply)
    + protocol = "-1"
    + security_group_id = "sg-0fffc4d49a499a1d8"
    + self = false
    + source_security_group_id = "sg-03bb33d3318e4aa03"
    + to_port = 65535
    + type = "ingress"
    }

    关于kubernetes - EKS : can't resolve DNS (but can ping IP) 中的 Pod,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59662585/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com