Last active
December 30, 2018 02:58
-
-
Save midN/c903bc63c6c024a581aa11ff17442652 to your computer and use it in GitHub Desktop.
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
AWSTemplateFormatVersion: '2010-09-09' | |
Parameters: | |
vpcId: | |
Type: AWS::EC2::VPC::Id | |
subnet: | |
Type: AWS::EC2::Subnet::Id | |
zone: | |
Type: AWS::Route53::HostedZone::Id | |
cluster: | |
Type: String | |
Resources: | |
role: | |
Type: AWS::IAM::Role | |
Properties: | |
AssumeRolePolicyDocument: | |
Version: '2012-10-17' | |
Statement: | |
- Effect: Allow | |
Principal: | |
Service: | |
- eks.amazonaws.com | |
Action: | |
- sts:AssumeRole | |
ManagedPolicyArns: | |
- arn:aws:iam::aws:policy/AmazonEKSServicePolicy | |
- arn:aws:iam::aws:policy/AmazonEKSClusterPolicy | |
eks: | |
Type: AWS::EKS::Cluster | |
Properties: | |
ResourcesVpcConfig: | |
SubnetIds: [!Ref subnet] | |
RoleArn: !Ref role | |
lc: | |
Type: AWS::AutoScaling::LaunchConfiguration | |
Properties: | |
# us-east-1 eks-optimized | |
ImageId: ami-0b4eb1d8782fc3aea | |
InstanceType: t3.nano | |
UserData: | |
!Base64 | |
"Fn::Sub": | | |
#!/bin/bash | |
set -o xtrace | |
/etc/eks/bootstrap.sh ${cluster} | |
/opt/aws/bin/cfn-signal --exit-code $? \ | |
--stack ${AWS::StackName} \ | |
--resource NodeGroup \ | |
--region ${AWS::Region} | |
ag: | |
Type: AWS::AutoScaling::AutoScalingGroup | |
Properties: | |
DesiredCapacity: 1 | |
LaunchConfigurationName: !Ref lc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment