Kubernetes AWS EKS负载平衡器未配置 [英] Kubernetes AWS EKS load balancer not provisioning
问题描述
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查询的信息,请参阅此文档.执行查询后,检查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屋!