-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathasg_node_group.yaml
50 lines (50 loc) · 1.41 KB
/
asg_node_group.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
AWSTemplateFormatVersion: '2010-09-09'
Description: 'Unmanaged EKS nodegroup using EC2 AutoScaling'
Parameters:
ClusterName:
Type: String
Description: Name of EKS cluster.
AutoScalingGroupName:
Description: Name of ASG.
Type: String
VpcId:
Type: AWS::EC2::VPC::Id
SubnetIds:
Type: List<AWS::EC2::Subnet::Id>
SecurityGroup:
Type: AWS::EC2::SecurityGroup::Id
LaunchTemplateName:
Type: String
Description: Launch template name.
LaunchTemplateVersion:
Type: String
Description: Launch template version.
Default: "$Default"
NodeCount:
Type: Number
Resources:
AutoScalingGroup:
Type: AWS::AutoScaling::AutoScalingGroup
UpdatePolicy:
AutoScalingRollingUpdate:
WaitOnResourceSignals: true
PauseTime: PT15M
Properties:
AutoScalingGroupName: !Ref AutoScalingGroupName
DesiredCapacity: !Ref NodeCount
MinSize: !Ref NodeCount
MaxSize: !Ref NodeCount
MixedInstancesPolicy:
LaunchTemplate:
LaunchTemplateSpecification:
LaunchTemplateName: !Ref LaunchTemplateName
Version: "1"
Overrides: PLACEHOLDER_LAUNCH_TEMPLATE_OVERRIDES
VPCZoneIdentifier:
!Ref SubnetIds
Tags:
# necessary for kubelet's legacy, in-tree cloud provider
- Key: !Sub kubernetes.io/cluster/${ClusterName}
Value: owned
PropagateAtLaunch: true