【问题标题】:AWS IAM Policy for eksctl scale nodegroupeksctl scale 节点组的 AWS IAM 策略
【发布时间】:2021-02-24 08:43:04
【问题描述】:

只授予 EKSCTL 访问权限是否足够

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "autoscaling:DescribeAutoScalingGroups",
                "autoscaling:DescribeAutoScalingInstances",
                "autoscaling:DescribeLaunchConfigurations",
                "autoscaling:DescribeTags",
                "autoscaling:SetDesiredCapacity"
            ],
            "Resource": "*"
        }
    ]
}

为了eksctl scale nodegroup --cluster cluster_name --nodes-min=1 --nodes-max=2 --nodes=1 nodegroup_name?

我如何才能将策略限制为仅扩展特定组或集群?

【问题讨论】:

    标签: amazon-web-services amazon-iam aws-auto-scaling eksctl


    【解决方案1】:

    eksctl 在 CloudFormation 堆栈上运行。因此,除了对autoscaling: 的只读访问权限之外,您的策略应该授予对cloudformation: 的写访问权限(我认为需要后者来将 ASG 的当前参数与所需参数进行比较,但需要测试和确认当然)。

    您应该能够在策略的 Resource 中使用通配符来限制对与特定命名模式匹配的 CloudFormation 堆栈的写入访问。例如eksctl-created 堆栈中始终包含集群名称。

    【讨论】:

      猜你喜欢
      • 2018-05-08
      • 2016-06-05
      • 1970-01-01
      • 2020-12-26
      • 1970-01-01
      • 1970-01-01
      • 2021-09-03
      • 2019-04-18
      • 2021-09-29
      相关资源
      最近更新 更多