Kubernetes AWS EKS 负载均衡器未配置 [英] Kubernetes AWS EKS load balancer not provisioning

查看:38
本文介绍了Kubernetes AWS EKS 负载均衡器未配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Neebie 了解 Kubernetes AWS EKS 的世界,希望得到支持.

Neebie to the world of Kubernetes AWS EKS and would great to get support.

我正在尝试部署一个节点应用程序.我在 EKS 上为我的 IAM 角色附加了正确的 IAM 策略,我还在私有和公共子网上设置了正确的标签.

I am trying to deploy a node app. I have the correct IAM policies attached to my IAM role on EKS, I have also setup the correct tags on the private and public subnets.

我的 Kubernetes yml 看起来像这样.

My Kubernetes yml looks like this.

kind: Deployment
metadata:
  name: test
spec:
  replicas: 1
  selector:
    matchLabels:
      app: test
  template:
    metadata:
      labels:
        app: test
    spec:
      containers:
        - name: test
          image: test:latest
          ports:
            - containerPort: 3000
          imagePullPolicy: Always
---
kind: Service
apiVersion: v1
metadata:
  name: test
spec:
  type: LoadBalancer
  selector:
    app: test
  ports:
  - protocol: TCP
    port: 80
    targetPort: 9376

服务已启动,但外部 ip 一直显示待处理且未配置负载均衡器.

The service starts but the external ip just keeps saying pending and no load balancer is provisioned.

谢谢

推荐答案

要解决此问题,您可以在 AWS EKS 集群控制平面日志下找到相关的故障日志.请参考这个 来自 AWS 的文档,其中包含查看 AWS EKS 集群控制平面日志的步骤,以及启用控制平面日志的步骤.

To troubleshoot this issue, you can find related failure logs under AWS EKS cluster control plane logs. Please refer this document from AWS with steps to view AWS EKS cluster control plane logs, also with steps to enable control plane logs.

如果您有可用的 AWS EKS 集群控制平面日志,那么您可以在 CloudWatch Logs Insights 中执行以下查询.有关执行 AWS CloudWatch Logs Insights 查询的信息,请参阅this 来自 AWS 的文档.执行查询后,检查responseObject.reason字段的值,也可以展开消息查看详情.

If you have AWS EKS cluster control plane log available, then you can execute following query in CloudWatch Logs Insights. For information about execution of AWS CloudWatch Logs Insights query, please refer this document from AWS. After execution of query, check for value of responseObject.reason field or you can also expand message to view details.

fields @timestamp, @message, requestObject.kind, requestObject.metadata.name,requestObject.spec.type,responseObject.status,responseObject.message,responseObject.reason,requestObject.spec.selector.app
| filter requestObject.spec.type='LoadBalancer' 
| sort @timestamp desc

这篇关于Kubernetes AWS EKS 负载均衡器未配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆