获得一个带有alb入口控制器和外部DNS连接到route53的EKS集群,现在一些客户端希望静态IP或IP范围连接到我们的服务器,并在防火墙中白名单这些IP。
试用了新的Accelerator,遵循本教程https://docs.aws.amazon.com/global-accelerator/latest/dg/getting-started.html,但失败了:
Listeners in this accelerator have an unhealthy status. To make sure that Global Accelerator can run health checks successfully, ensure that a service is responding on the protocol and port that you specified in the health check configuration. Learn more进一步了解到,在ALB上配置的健康检查是相同的,而且由于route53健康检查ips没有被白化,所以它可能会失败,但是所有入站通信量都是在端口80和443中打开的,所以不太确定如何进一步调试它,或者是否有任何其他解决方案来为ALB获取ip范围或静态ip。
发布于 2020-08-13 15:47:21
您需要在入口控制器中添加类似于此的健康检查规则:
- http:
paths:
- path: /global-accelerator-healthcheck
backend:
serviceName: global-accelerator-healthcheck
servicePort: use-annotation然后是注释:
alb.ingress.kubernetes.io/actions.global-accelerator-healthcheck: '{"Type": "fixed-response", "FixedResponseConfig": {"ContentType": "text/plain", "StatusCode": "200", "MessageBody": "healthy" }}'然后将全局加速器配置为对该端点的健康检查。
发布于 2021-03-27 15:45:31
当涉及到AWS ALB入侵控制器时,请始终在使用AWS ALB及其目标组时考虑它。
中添加以下细节来回答您的问题
代码:
annotations:
alb.ingress.kubernetes.io/healthcheck-protocol: HTTP
alb.ingress.kubernetes.io/healthcheck-port: "8161"
alb.ingress.kubernetes.io/healthcheck-path: /admin
alb.ingress.kubernetes.io/success-codes: '401'
alb.ingress.kubernetes.io/backend-protocol: HTTP`注意:如果您对不同的服务有不同的健康检查设置,请从K8s "Ingress“中删除这个块,并为每个K8s”服务“添加块。
如需更多资料,请参阅:https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.1/guide/ingress/annotations/
https://stackoverflow.com/questions/60004876
复制相似问题