简体   繁体   English

无法在亚马逊 eks 上创建 ALB 入口控制器

[英]failing to create ALB ingress controller on amazon eks

I am trying to create ALB ingress controller on amazon eks i am following https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html documentation when i run kubectl apply -f alb-ingress-controller.yaml command i get below error.我正在尝试在亚马逊 eks 上创建 ALB 入口控制器,当我运行 kubectl apply -f alb-ingress-controller 时,我正在关注https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html文档.yaml 命令我得到以下错误。 Please help me to fix this issue.请帮我解决这个问题。 i have referred many documentation but it is still failing to create ALB ingress controller.我参考了许多文档,但仍然无法创建 ALB 入口控制器。 PF alb-ingress-controller.yaml file below PF alb-ingress-controller.yaml 文件如下

error:错误:

The Deployment "alb-ingress-controller" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app.kubernetes.io/name":"alb-ingress-controller"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable部署“alb-ingress-controller”无效:spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app.kubernetes.io/name":"alb-ingress-controller"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}:字段不可变

 # Application Load Balancer (ALB) Ingress Controller Deployment Manifest. # This manifest details sensible defaults for deploying an ALB Ingress Controller. # GitHub: https://github.com/kubernetes-sigs/aws-alb-ingress-controller apiVersion: apps/v1 kind: Deployment metadata: labels: app.kubernetes.io/name: alb-ingress-controller name: alb-ingress-controller # Namespace the ALB Ingress Controller should run in. Does not impact which # namespaces it's able to resolve ingress resource for. For limiting ingress # namespace scope, see --watch-namespace. namespace: kube-system spec: selector: matchLabels: app.kubernetes.io/name: alb-ingress-controller template: metadata: labels: app.kubernetes.io/name: alb-ingress-controller spec: containers: - name: alb-ingress-controller args: # Limit the namespace where this ALB Ingress Controller deployment will # resolve ingress resources. If left commented, all namespaces are used. # - --watch-namespace=your-k8s-namespace # Setting the ingress-class flag below ensures that only ingress resources with the # annotation kubernetes.io/ingress.class: "alb" are respected by the controller. You may # choose any class you'd like for this controller to respect. - --ingress-class=alb # REQUIRED # Name of your cluster. Used when naming resources created # by the ALB Ingress Controller, providing distinction between # clusters. - --cluster-name=Cluster-name # AWS VPC ID this ingress controller will use to create AWS resources. # If unspecified, it will be discovered from ec2metadata. - --aws-vpc-id=vpc-id # AWS region this ingress controller will operate in. # If unspecified, it will be discovered from ec2metadata. # List of regions: http://docs.aws.amazon.com/general/latest/gr/rande.html#vpc_region - --aws-region=ap-south-1 # Enables logging on all outbound requests sent to the AWS API. # If logging is desired, set to true. # - --aws-api-debug # Maximum number of times to retry the aws calls. # defaults to 10. # - --aws-max-retries=10 # env: # AWS key id for authenticating with the AWS API. # This is only here for examples. It's recommended you instead use # a project like kube2iam for granting access. #- name: AWS_ACCESS_KEY_ID # value: KEYVALUE # AWS key secret for authenticating with the AWS API. # This is only here for examples. It's recommended you instead use # a project like kube2iam for granting access. #- name: AWS_SECRET_ACCESS_KEY # value: SECRETVALUE # Repository location of the ALB Ingress Controller. image: docker.io/amazon/aws-alb-ingress-controller:v1.1.3 serviceAccountName: alb-ingress-controller

删除旧部署并创建新部署后出现上述错误 在此处输入图片说明

在此处输入图片说明

I got the same error, I had to delete the old deployment then re apply.我遇到了同样的错误,我不得不删除旧的部署然后重新申请。

kubectl get deployments --all-namespaces

Lists all the deployments.列出所有部署。

If you can see alb-ingress-controller:如果你能看到 alb-ingress-controller:

kubectl -n [namespace] delete deploy alb-ingress-controller

Will delete the old deployment, then try again.将删除旧部署,然后重试。

I could fix the ALB ingress controller issue by increassing the instance type to two t3.Xlarge Linux nodes.我可以通过将实例类型增加到两个 t3.Xlarge Linux 节点来修复 ALB 入口控制器问题。 My cluster contains 2 Linux nodes and 1 windows nodes.Here is the documentation i referred.我的集群包含 2 个 Linux 节点和 1 个 Windows 节点。这是我参考的文档。

https://docs.aws.amazon.com/eks/latest/userguide/getting-started-console.html https://docs.aws.amazon.com/eks/latest/userguide/launch-windows-workers.html https://medium.com/faun/aws-eks-and-pods-sizing-per-node-considerations-964b08dcfad3 https://docs.aws.amazon.com/eks/latest/userguide/getting-started-console.html https://docs.aws.amazon.com/eks/latest/userguide/launch-windows-workers.html https://medium.com/faun/aws-eks-and-pods-sizing-per-node-thinkations-964b08dcfad3

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

相关问题 Terraform AWS Kubernetes EKS 资源与 ALB 入口 Controller 不会创建负载均衡器 - Terraform AWS Kubernetes EKS resources with ALB Ingress Controller won't create load balancer 适用于 EKS 的 AWS ALB(入口控制器)前面的 AWS API 网关 - AWS API Gateway infront of AWS ALB (Ingress Controller) for EKS 只有“/”适用于 AWS EKS 中的 NGINX 入口控制器和 ALB - Only the '/' works with NGINX ingress controller and ALB in AWS EKS Eks ALB 入口控制器配置 add_header - Eks ALB Ingress-Controller configure add_header EKS 节点未使用 ALB 入口 Controller 在目标组中注册 - EKS Nodes not Registering in Target Group using ALB Ingress Controller EKS Fargate - 用于没有出站 Internet 访问的私有集群的入口 controller? 不支持 aws-alb-ingress - EKS Fargate - ingress controller for a private cluster with no outbound internet access? aws-alb-ingress not supported EKS AWS ALB 入口控制器(AWS 负载均衡器控制器控制器)中文件扩展的路径路由 - Path routing for file extension in EKS AWS ALB Ingress Controller (AWS Load Balancer Controller controller) AWS 上的 ALB 入口控制器 - ALB Ingress Controller on AWS 无法在 Terraform 中创建 AWS ALB kubernetes 入口 controller - Can't create AWS ALB kubernetes ingress controller in Terraform 503 Service Temporarily Unavailable use EKS ALB Ingress - 503 Service Temporarily Unavailable use EKS ALB Ingress
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM