调用 webhook“vingress.elbv2.k8s.aws”失败

yer*_*lom 7 amazon-web-services kubernetes kubernetes-ingress amazon-eks aws-application-load-balancer

我在新的 EKS 集群(版本 v1.21.5-eks-bc4871b)​​上安装了 aws-load-balancer-controller。

我按照本指南安装了https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.3/deploy/installation/一步一步,但是当我尝试部署入口对象时,我得到了我在标题中提到的错误。我尝试做像这里这样的 github issues 问题https://github.com/kubernetes-sigs/aws-load-balancer-controller/issues/2039但没有找到任何答案。

我还能做什么来检查这个?

小智 20

如果它可能对其他人有帮助 - 我也遇到了使用 Fargate 配置文件和 core-dns 的工作节点的原始问题。我在另一个地方找到的解决方案只是添加

node_security_group_additional_rules = {
  ingress_allow_access_from_control_plane = {
    type                          = "ingress"
    protocol                      = "tcp"
    from_port                     = 9443
    to_port                       = 9443
    source_cluster_security_group = true
    description                   = "Allow access from control plane to webhook port of AWS load balancer controller"
  }
}
Run Code Online (Sandbox Code Playgroud)


RuB*_*iCK 5

我假设您收到如下错误消息,如果不是这种情况,请发布您的错误。

Error from server (InternalError): error when creating "anymanifest.yaml": Internal error occurred: failed calling webhook "vingress.elbv2.k8s.aws": Post "https://aws-load-balancer-webhook-service.kube-system.svc:443/validate-networking-v1beta1-ingress?timeout=10s": context deadline exceeded
Run Code Online (Sandbox Code Playgroud)

通常,发生这种情况是由于 EKS 控制平面无法使用 Webhook 端口与节点进行通信。

查看 aws-load-balancer-controller pod 的日志以检查它开始侦听的端口

{"level":"info","ts":1643365219.2410042,"logger":"controller-runtime.webhook","msg":"serving webhook server","host":"","port":9443}
Run Code Online (Sandbox Code Playgroud)

为了解决这个问题,在工作节点的安全组中,允许9443来自 EKS 控制平面的端口通信