-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added documentation about AWS ASG MixedInstancesPolicy
- Loading branch information
Showing
2 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
69 changes: 69 additions & 0 deletions
69
cluster-autoscaler/cloudprovider/aws/MixedInstancePolicy.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
The following is an excerpt from a CloudFormation template showing how a MixedInstancesPolicy can be used with ClusterAutoscaler: | ||
|
||
```json | ||
{ | ||
"Resources": { | ||
"LaunchTemplate": { | ||
"Type": "AWS::EC2::LaunchTemplate", | ||
"Properties": { | ||
"LaunchTemplateName": "memory-opt-2xlarge", | ||
"LaunchTemplateData": { | ||
"InstanceType": "r5.2xlarge" | ||
} | ||
} | ||
}, | ||
"ASGA": { | ||
"Type": "AWS::AutoScaling::AutoScalingGroup", | ||
"Properties": { | ||
"MinSize": 1, | ||
"MaxSize": 10, | ||
"MixedInstancesPolicy": { | ||
"InstancesDistribution": { | ||
"OnDemandBaseCapacity": 0, | ||
"OnDemandPercentageAboveBaseCapacity": 0 | ||
}, | ||
"LaunchTemplate": { | ||
"LaunchTemplateSpecification": { | ||
"LaunchTemplateId": { | ||
"Ref": "LaunchTemplate" | ||
}, | ||
"Version": { | ||
"Fn::GetAtt": [ | ||
"LaunchTemplate", | ||
"LatestVersionNumber" | ||
] | ||
} | ||
}, | ||
"Overrides": [ | ||
{ | ||
"InstanceType": "r5.2xlarge" | ||
}, | ||
{ | ||
"InstanceType": "r5d.2xlarge" | ||
}, | ||
{ | ||
"InstanceType": "i3.2xlarge" | ||
}, | ||
{ | ||
"InstanceType": "r5a.2xlarge" | ||
}, | ||
{ | ||
"InstanceType": "r5ad.2xlarge" | ||
} | ||
] | ||
} | ||
}, | ||
"VPCZoneIdentifier": [ | ||
"subnet-###############" | ||
], | ||
} | ||
}, | ||
"ASGB": {}, | ||
"ASGC": {} | ||
} | ||
} | ||
``` | ||
|
||
[r5.2xlarge](https://aws.amazon.com/ec2/instance-types/#Memory_Optimized) is the 'base' instance type, with overrides for r5d.2xlarge, i3.2xlarge, r5a.2xlarge and r5ad.2xlarge. | ||
|
||
Note how one Auto Scaling Group is created per Availability Zone, since CA does not currently support ASGs that span multiple Availability Zones. See [Common Notes and Gotchas](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler/cloudprovider/aws#common-notes-and-gotchas). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters