Skip to content

Commit 5ec3146

Browse files
authored
Merge pull request kubernetes#2929 from Jeffwan/add_resource_doc
Add instructions to tag resource for scale from 0 case
2 parents a76ae87 + f7f50d9 commit 5ec3146

File tree

1 file changed

+13
-0
lines changed
  • cluster-autoscaler/cloudprovider/aws

1 file changed

+13
-0
lines changed

cluster-autoscaler/cloudprovider/aws/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ kubectl apply -f examples/cluster-autoscaler-autodiscover.yaml
114114
From CA 0.6.1 - it is possible to scale a node group to 0 (and obviously from 0), assuming that all scale-down conditions are met.
115115

116116
If you are using `nodeSelector` you need to tag the ASG with a node-template key `"k8s.io/cluster-autoscaler/node-template/label/"` and `"k8s.io/cluster-autoscaler/node-template/taint/"` if you are using taints.
117+
If your pods request resources other than `cpu` and `memory`, you need to tag ASG with key `k8s.io/cluster-autoscaler/node-template/resources/`.
117118

118119
For example for a node label of `foo=bar` you would tag the ASG with:
119120

@@ -138,6 +139,18 @@ And for a taint of `"dedicated": "foo:NoSchedule"` you would tag the ASG with:
138139
"Key": "k8s.io/cluster-autoscaler/node-template/taint/dedicated"
139140
}
140141
```
142+
If you request other resources on the node, like `vpc.amazonaws.com/PrivateIPv4Address` for Windows nodes, `ephemeral-storage`, etc, you would tag ASG with
143+
144+
```json
145+
{
146+
"ResourceType": "auto-scaling-group",
147+
"ResourceId": "foo.example.com",
148+
"PropagateAtLaunch": true,
149+
"Value": "2",
150+
"Key": "k8s.io/cluster-autoscaler/node-template/resources/vpc.amazonaws.com/PrivateIPv4Address"
151+
}
152+
```
153+
> Note: This is only supported in CA 1.14.x and above
141154
142155
If you'd like to scale node groups from 0, an `autoscaling:DescribeLaunchConfigurations` or `ec2:DescribeLaunchTemplateVersions` permission is required depending on if you made your ASG with Launch Configuration or Launch Template:
143156

0 commit comments

Comments
 (0)