@@ -19,7 +19,23 @@ the EC2 instance on which the Cluster Autoscaler pod runs.
...
@@ -19,7 +19,23 @@ the EC2 instance on which the Cluster Autoscaler pod runs.
### IAM Policy
### IAM Policy
The following policy provides the minimum privileges necessary for Cluster Autoscaler to run:
There are a number of ways to run the autoscaler in AWS, which can significantly
impact the range of IAM permissions required for the Cluster Autoscaler to function
properly. Two options are provided below, one which will allow use of all of the
features of the Cluster Autoscaler, the second with a more limited range of IAM
actions enabled, which enforces using certain configuration options in the
Cluster Autoscaler binary.
It is strongly recommended to restrict the target resources for the autoscaling actions
by either [specifying Auto Scaling Group ARNs](https://docs.aws.amazon.com/autoscaling/latest/userguide/control-access-using-iam.html#policy-auto-scaling-resources) in the `Resource` list of the policy or
[using tag based conditionals](https://docs.aws.amazon.com/autoscaling/ec2/userguide/control-access-using-iam.html#security_iam_service-with-iam-tags). The [minimal policy](#minimal-iam-permissions-policy)
includes an example of restricting by ASG ARN.
#### Full Cluster Autoscaler Features Policy (Recommended)
Permissions required when using [ASG Autodiscovery](#Auto-discovery-setup) and
Dynamic EC2 List Generation (the default behaviour). In this example, only the second block of actions
should be updated to restrict the resources/add conditionals:
```json
```json
{
{
...
@@ -31,9 +47,17 @@ The following policy provides the minimum privileges necessary for Cluster Autos
...
@@ -31,9 +47,17 @@ The following policy provides the minimum privileges necessary for Cluster Autos