简体   繁体   English

Kubernetes AWS EKS 负载均衡器未配置

[英]Kubernetes AWS EKS load balancer not provisioning

Neebie to the world of Kubernetes AWS EKS and would great to get support. Neebie 来到 Kubernetes AWS EKS 的世界,很高兴获得支持。

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.我在 EKS 上的 IAM 角色上附加了正确的 IAM 策略,我还在私有子网和公共子网上设置了正确的标签。

My Kubernetes yml looks like this.我的 Kubernetes yml 看起来像这样。

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

The service starts but the external ip just keeps saying pending and no load balancer is provisioned.服务启动,但外部 ip 只是一直说挂起,并且没有配置负载均衡器。

Thanks谢谢

To troubleshoot this issue, you can find related failure logs under AWS EKS cluster control plane logs.要解决此问题,您可以在 AWS EKS 集群控制平面日志下找到相关的故障日志。 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 的文档,其中包含查看 AWS EKS 集群控制平面日志的步骤,以及启用控制平面日志的步骤。

If you have AWS EKS cluster control plane log available, then you can execute following query in CloudWatch Logs Insights.如果您有可用的 AWS EKS 集群控制平面日志,则可以在 CloudWatch Logs Insights 中执行以下查询。 For information about execution of AWS CloudWatch Logs Insights query, please refer this document from AWS.有关执行 AWS CloudWatch Logs Insights 查询的信息,请参阅 AWS 的文档。 After execution of query, check for value of responseObject.reason field or you can also expand message to view details.执行查询后,检查responseObject.reason字段的值,或者您也可以展开消息以查看详细信息。

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

I had the same issue on ALB (Ingress type).我在 ALB(入口类型)上遇到了同样的问题。

I can view the status (cause of error / success) by command of kubectl as follows.我可以通过 kubectl 的命令查看状态(错误/成功的原因),如下所示。 The command helped me to understand error cause which helped me to correct it.该命令帮助我了解错误原因,帮助我纠正它。

kubectl describe ingress <ingress component name> -n <name of namespace>

You can get the name of namespace and ingress component name in metadata section from yaml file.您可以从 yaml 文件中获取元数据部分中的命名空间名称和入口组件名称。

If you are using Mnikube如果您使用的是 Mnikube

minikube tunnel

this will help you.这会帮助你。

This command can expose the services of type LoadBalancer.此命令可以公开 LoadBalancer 类型的服务。

Here is the reference https://minikube.sigs.k8s.io/docs/commands/tunnel/ .这是参考https://minikube.sigs.k8s.io/docs/commands/tunnel/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么 Kubernetes (AWS EKS) 将所有工作人员注册到负载均衡器? - Why is Kubernetes (AWS EKS) registering all workers to the Load Balancer? AWS EKS aws-load-balancer-controller - AWS EKS aws-load-balancer-controller Terraform AWS Kubernetes EKS 资源与 ALB 入口 Controller 不会创建负载均衡器 - Terraform AWS Kubernetes EKS resources with ALB Ingress Controller won't create load balancer AWS EKS - 创建负载均衡器 controller 失败 - AWS EKS - Failure creating load balancer controller 使用负载均衡器在 AWS EKS 上公开 Hazelcast 集群 - Expose a Hazelcast cluster on AWS EKS with a load balancer 带有 AWS 负载均衡器控制器的 EKS 上的网络负载均衡器 - Network Load Balancer on EKS with AWS Load Balancer Controller EKS 服务 504 网关超时 - AWS 应用程序负载均衡器 Controller - EKS Service 504 Gateway Timeout - AWS Application Load Balancer Controller AWS EKS 负载均衡器服务卡在外部 IP [待定] - AWS EKS load balancer service stuck at external-ip[pending] 带有 static ip 的内部负载均衡器,在 AWS EKS 中支持 HTTPS - internal load balancer with static ip and supports HTTPS in AWS EKS 如何在kubernetes的aws上创建应用程序负载均衡器 - How to create application load balancer on aws for kubernetes
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM