kops 无法为入口控制器部署 elb

kops 无法为入口控制器部署 elb

我无法使用此方法在 aws 的 kops 1.9 中部署 nginx ingress

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/mandatory.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/provider/aws/service-l4.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/provider/aws/patch-configmap-l4.yaml

# kubectl describe svc  ingress-nginx -n ingress-nginx



Warning  CreatingLoadBalancerFailed  2s                service-controller  Error creating load balancer (will retry): failed to ensure load balancer for service ingress-nginx/ingress-nginx: AccessDenied: User: arn:aws:sts::605051368824:assumed-role/masters.play.domain.org/i-0372932f001403e37 is not authorized to perform: iam:CreateServiceLinkedRole on resource: arn:aws:iam::605051368824:role/aws-service-role/elasticloadbalancing.amazonaws.com/AWSServiceRoleForElasticLoadBalancing
           status code: 403, request id: b41a558a-9668-11e8-9265-3b1bdc7d9e74

答案1

将其添加到您的集群配置中:

规格:
  附加政策:
    大师:|
      [
        {
          "效果": "允许",
          "操作": "iam:CreateServiceLinkedRole",
          "资源": "arn:aws:iam::*:角色/aws-service-role/*"
         },
         {
           "效果": "允许",
           “行动”: [
             “ec2:描述帐户属性”,
             “ec2:描述互联网网关”
            ],
           “资源”:“*”
         }
      ]

相关内容