{ "Resources": { "AWSAutoScalingAutoScalingGroupmasterustest1amastersminimalexamplecom": { "Type": "AWS::AutoScaling::AutoScalingGroup", "Properties": { "AutoScalingGroupName": "master-us-test-1a.masters.minimal.example.com", "LaunchTemplate": { "LaunchTemplateId": { "Ref": "AWSEC2LaunchTemplatemasterustest1amastersminimalexamplecom" }, "Version": { "Fn::GetAtt": [ "AWSEC2LaunchTemplatemasterustest1amastersminimalexamplecom", "LatestVersionNumber" ] } }, "MaxSize": 1, "MinSize": 1, "VPCZoneIdentifier": [ { "Ref": "AWSEC2Subnetustest1aminimalexamplecom" } ], "Tags": [ { "Key": "KubernetesCluster", "Value": "minimal.example.com", "PropagateAtLaunch": true }, { "Key": "Name", "Value": "master-us-test-1a.masters.minimal.example.com", "PropagateAtLaunch": true }, { "Key": "k8s.io/role/master", "Value": "1", "PropagateAtLaunch": true }, { "Key": "kops.k8s.io/instancegroup", "Value": "master-us-test-1a", "PropagateAtLaunch": true }, { "Key": "kubernetes.io/cluster/minimal.example.com", "Value": "owned", "PropagateAtLaunch": true } ], "MetricsCollection": [ { "Granularity": "1Minute", "Metrics": [ "GroupDesiredCapacity", "GroupInServiceInstances", "GroupMaxSize", "GroupMinSize", "GroupPendingInstances", "GroupStandbyInstances", "GroupTerminatingInstances", "GroupTotalInstances" ] } ] } }, "AWSAutoScalingAutoScalingGroupnodesminimalexamplecom": { "Type": "AWS::AutoScaling::AutoScalingGroup", "Properties": { "AutoScalingGroupName": "nodes.minimal.example.com", "LaunchTemplate": { "LaunchTemplateId": { "Ref": "AWSEC2LaunchTemplatenodesminimalexamplecom" }, "Version": { "Fn::GetAtt": [ "AWSEC2LaunchTemplatenodesminimalexamplecom", "LatestVersionNumber" ] } }, "MaxSize": 2, "MinSize": 2, "VPCZoneIdentifier": [ { "Ref": "AWSEC2Subnetustest1aminimalexamplecom" } ], "Tags": [ { "Key": "KubernetesCluster", "Value": "minimal.example.com", "PropagateAtLaunch": true }, { "Key": "Name", "Value": "nodes.minimal.example.com", "PropagateAtLaunch": true }, { "Key": "k8s.io/role/node", "Value": "1", "PropagateAtLaunch": true }, { "Key": "kops.k8s.io/instancegroup", "Value": "nodes", "PropagateAtLaunch": true }, { "Key": "kubernetes.io/cluster/minimal.example.com", "Value": "owned", "PropagateAtLaunch": true } ], "MetricsCollection": [ { "Granularity": "1Minute", "Metrics": [ "GroupDesiredCapacity", "GroupInServiceInstances", "GroupMaxSize", "GroupMinSize", "GroupPendingInstances", "GroupStandbyInstances", "GroupTerminatingInstances", "GroupTotalInstances" ] } ] } }, "AWSEC2DHCPOptionsminimalexamplecom": { "Type": "AWS::EC2::DHCPOptions", "Properties": { "DomainName": "us-test-1.compute.internal", "DomainNameServers": [ "AmazonProvidedDNS" ], "Tags": [ { "Key": "KubernetesCluster", "Value": "minimal.example.com" }, { "Key": "Name", "Value": "minimal.example.com" }, { "Key": "kubernetes.io/cluster/minimal.example.com", "Value": "owned" } ] } }, "AWSEC2InternetGatewayminimalexamplecom": { "Type": "AWS::EC2::InternetGateway", "Properties": { "Tags": [ { "Key": "KubernetesCluster", "Value": "minimal.example.com" }, { "Key": "Name", "Value": "minimal.example.com" }, { "Key": "kubernetes.io/cluster/minimal.example.com", "Value": "owned" } ] } }, "AWSEC2LaunchTemplatemasterustest1amastersminimalexamplecom": { "Type": "AWS::EC2::LaunchTemplate", "Properties": { "LaunchTemplateName": "master-us-test-1a.masters.minimal.example.com", "LaunchTemplateData": { "BlockDeviceMappings": [ { "DeviceName": "/dev/xvda", "Ebs": { "VolumeType": "gp2", "VolumeSize": 64, "DeleteOnTermination": true } }, { "DeviceName": "/dev/sdc", "VirtualName": "ephemeral0" } ], "IamInstanceProfile": { "Name": { "Ref": "AWSIAMInstanceProfilemastersminimalexamplecom" } }, "ImageId": "ami-12345678", "InstanceType": "m3.medium", "KeyName": "kubernetes.minimal.example.com-c4:a6:ed:9a:a8:89:b9:e2:c3:9c:d6:63:eb:9c:71:57", "NetworkInterfaces": [ { "AssociatePublicIpAddress": true, "DeleteOnTermination": true, "DeviceIndex": 0, "Groups": [ { "Ref": "AWSEC2SecurityGroupmastersminimalexamplecom" } ] } ], "TagSpecifications": [ { "ResourceType": "instance", "Tags": [ { "Key": "KubernetesCluster", "Value": "minimal.example.com" }, { "Key": "Name", "Value": "master-us-test-1a.masters.minimal.example.com" }, { "Key": "k8s.io/role/master", "Value": "1" }, { "Key": "kops.k8s.io/instancegroup", "Value": "master-us-test-1a" }, { "Key": "kubernetes.io/cluster/minimal.example.com", "Value": "owned" } ] }, { "ResourceType": "volume", "Tags": [ { "Key": "KubernetesCluster", "Value": "minimal.example.com" }, { "Key": "Name", "Value": "master-us-test-1a.masters.minimal.example.com" }, { "Key": "k8s.io/role/master", "Value": "1" }, { "Key": "kops.k8s.io/instancegroup", "Value": "master-us-test-1a" }, { "Key": "kubernetes.io/cluster/minimal.example.com", "Value": "owned" } ] } ], "UserData": "extracted" } } }, "AWSEC2LaunchTemplatenodesminimalexamplecom": { "Type": "AWS::EC2::LaunchTemplate", "Properties": { "LaunchTemplateName": "nodes.minimal.example.com", "LaunchTemplateData": { "BlockDeviceMappings": [ { "DeviceName": "/dev/xvda", "Ebs": { "VolumeType": "gp2", "VolumeSize": 128, "DeleteOnTermination": true } } ], "IamInstanceProfile": { "Name": { "Ref": "AWSIAMInstanceProfilenodesminimalexamplecom" } }, "ImageId": "ami-12345678", "InstanceType": "t2.medium", "KeyName": "kubernetes.minimal.example.com-c4:a6:ed:9a:a8:89:b9:e2:c3:9c:d6:63:eb:9c:71:57", "NetworkInterfaces": [ { "AssociatePublicIpAddress": true, "DeleteOnTermination": true, "DeviceIndex": 0, "Groups": [ { "Ref": "AWSEC2SecurityGroupnodesminimalexamplecom" } ] } ], "TagSpecifications": [ { "ResourceType": "instance", "Tags": [ { "Key": "KubernetesCluster", "Value": "minimal.example.com" }, { "Key": "Name", "Value": "nodes.minimal.example.com" }, { "Key": "k8s.io/role/node", "Value": "1" }, { "Key": "kops.k8s.io/instancegroup", "Value": "nodes" }, { "Key": "kubernetes.io/cluster/minimal.example.com", "Value": "owned" } ] }, { "ResourceType": "volume", "Tags": [ { "Key": "KubernetesCluster", "Value": "minimal.example.com" }, { "Key": "Name", "Value": "nodes.minimal.example.com" }, { "Key": "k8s.io/role/node", "Value": "1" }, { "Key": "kops.k8s.io/instancegroup", "Value": "nodes" }, { "Key": "kubernetes.io/cluster/minimal.example.com", "Value": "owned" } ] } ], "UserData": "extracted" } } }, "AWSEC2Route00000": { "Type": "AWS::EC2::Route", "Properties": { "RouteTableId": { "Ref": "AWSEC2RouteTableminimalexamplecom" }, "DestinationCidrBlock": "0.0.0.0/0", "GatewayId": { "Ref": "AWSEC2InternetGatewayminimalexamplecom" } } }, "AWSEC2RouteTableminimalexamplecom": { "Type": "AWS::EC2::RouteTable", "Properties": { "VpcId": { "Ref": "AWSEC2VPCminimalexamplecom" }, "Tags": [ { "Key": "KubernetesCluster", "Value": "minimal.example.com" }, { "Key": "Name", "Value": "minimal.example.com" }, { "Key": "kubernetes.io/cluster/minimal.example.com", "Value": "owned" }, { "Key": "kubernetes.io/kops/role", "Value": "public" } ] } }, "AWSEC2SecurityGroupEgressmasteregress": { "Type": "AWS::EC2::SecurityGroupEgress", "Properties": { "GroupId": { "Ref": "AWSEC2SecurityGroupmastersminimalexamplecom" }, "FromPort": 0, "ToPort": 0, "IpProtocol": "-1", "CidrIp": "0.0.0.0/0" } }, "AWSEC2SecurityGroupEgressnodeegress": { "Type": "AWS::EC2::SecurityGroupEgress", "Properties": { "GroupId": { "Ref": "AWSEC2SecurityGroupnodesminimalexamplecom" }, "FromPort": 0, "ToPort": 0, "IpProtocol": "-1", "CidrIp": "0.0.0.0/0" } }, "AWSEC2SecurityGroupIngressallmastertomaster": { "Type": "AWS::EC2::SecurityGroupIngress", "Properties": { "GroupId": { "Ref": "AWSEC2SecurityGroupmastersminimalexamplecom" }, "SourceSecurityGroupId": { "Ref": "AWSEC2SecurityGroupmastersminimalexamplecom" }, "FromPort": 0, "ToPort": 0, "IpProtocol": "-1" } }, "AWSEC2SecurityGroupIngressallmastertonode": { "Type": "AWS::EC2::SecurityGroupIngress", "Properties": { "GroupId": { "Ref": "AWSEC2SecurityGroupnodesminimalexamplecom" }, "SourceSecurityGroupId": { "Ref": "AWSEC2SecurityGroupmastersminimalexamplecom" }, "FromPort": 0, "ToPort": 0, "IpProtocol": "-1" } }, "AWSEC2SecurityGroupIngressallnodetonode": { "Type": "AWS::EC2::SecurityGroupIngress", "Properties": { "GroupId": { "Ref": "AWSEC2SecurityGroupnodesminimalexamplecom" }, "SourceSecurityGroupId": { "Ref": "AWSEC2SecurityGroupnodesminimalexamplecom" }, "FromPort": 0, "ToPort": 0, "IpProtocol": "-1" } }, "AWSEC2SecurityGroupIngresshttpsexternaltomaster00000": { "Type": "AWS::EC2::SecurityGroupIngress", "Properties": { "GroupId": { "Ref": "AWSEC2SecurityGroupmastersminimalexamplecom" }, "FromPort": 443, "ToPort": 443, "IpProtocol": "tcp", "CidrIp": "0.0.0.0/0" } }, "AWSEC2SecurityGroupIngressnodetomastertcp12379": { "Type": "AWS::EC2::SecurityGroupIngress", "Properties": { "GroupId": { "Ref": "AWSEC2SecurityGroupmastersminimalexamplecom" }, "SourceSecurityGroupId": { "Ref": "AWSEC2SecurityGroupnodesminimalexamplecom" }, "FromPort": 1, "ToPort": 2379, "IpProtocol": "tcp" } }, "AWSEC2SecurityGroupIngressnodetomastertcp23824000": { "Type": "AWS::EC2::SecurityGroupIngress", "Properties": { "GroupId": { "Ref": "AWSEC2SecurityGroupmastersminimalexamplecom" }, "SourceSecurityGroupId": { "Ref": "AWSEC2SecurityGroupnodesminimalexamplecom" }, "FromPort": 2382, "ToPort": 4000, "IpProtocol": "tcp" } }, "AWSEC2SecurityGroupIngressnodetomastertcp400365535": { "Type": "AWS::EC2::SecurityGroupIngress", "Properties": { "GroupId": { "Ref": "AWSEC2SecurityGroupmastersminimalexamplecom" }, "SourceSecurityGroupId": { "Ref": "AWSEC2SecurityGroupnodesminimalexamplecom" }, "FromPort": 4003, "ToPort": 65535, "IpProtocol": "tcp" } }, "AWSEC2SecurityGroupIngressnodetomasterudp165535": { "Type": "AWS::EC2::SecurityGroupIngress", "Properties": { "GroupId": { "Ref": "AWSEC2SecurityGroupmastersminimalexamplecom" }, "SourceSecurityGroupId": { "Ref": "AWSEC2SecurityGroupnodesminimalexamplecom" }, "FromPort": 1, "ToPort": 65535, "IpProtocol": "udp" } }, "AWSEC2SecurityGroupIngresssshexternaltomaster00000": { "Type": "AWS::EC2::SecurityGroupIngress", "Properties": { "GroupId": { "Ref": "AWSEC2SecurityGroupmastersminimalexamplecom" }, "FromPort": 22, "ToPort": 22, "IpProtocol": "tcp", "CidrIp": "0.0.0.0/0" } }, "AWSEC2SecurityGroupIngresssshexternaltonode00000": { "Type": "AWS::EC2::SecurityGroupIngress", "Properties": { "GroupId": { "Ref": "AWSEC2SecurityGroupnodesminimalexamplecom" }, "FromPort": 22, "ToPort": 22, "IpProtocol": "tcp", "CidrIp": "0.0.0.0/0" } }, "AWSEC2SecurityGroupmastersminimalexamplecom": { "Type": "AWS::EC2::SecurityGroup", "Properties": { "VpcId": { "Ref": "AWSEC2VPCminimalexamplecom" }, "GroupDescription": "Security group for masters", "Tags": [ { "Key": "KubernetesCluster", "Value": "minimal.example.com" }, { "Key": "Name", "Value": "masters.minimal.example.com" }, { "Key": "kubernetes.io/cluster/minimal.example.com", "Value": "owned" } ] } }, "AWSEC2SecurityGroupnodesminimalexamplecom": { "Type": "AWS::EC2::SecurityGroup", "Properties": { "VpcId": { "Ref": "AWSEC2VPCminimalexamplecom" }, "GroupDescription": "Security group for nodes", "Tags": [ { "Key": "KubernetesCluster", "Value": "minimal.example.com" }, { "Key": "Name", "Value": "nodes.minimal.example.com" }, { "Key": "kubernetes.io/cluster/minimal.example.com", "Value": "owned" } ] } }, "AWSEC2SubnetRouteTableAssociationustest1aminimalexamplecom": { "Type": "AWS::EC2::SubnetRouteTableAssociation", "Properties": { "SubnetId": { "Ref": "AWSEC2Subnetustest1aminimalexamplecom" }, "RouteTableId": { "Ref": "AWSEC2RouteTableminimalexamplecom" } } }, "AWSEC2Subnetustest1aminimalexamplecom": { "Type": "AWS::EC2::Subnet", "Properties": { "VpcId": { "Ref": "AWSEC2VPCminimalexamplecom" }, "CidrBlock": "172.20.32.0/19", "AvailabilityZone": "us-test-1a", "Tags": [ { "Key": "KubernetesCluster", "Value": "minimal.example.com" }, { "Key": "Name", "Value": "us-test-1a.minimal.example.com" }, { "Key": "SubnetType", "Value": "Public" }, { "Key": "kubernetes.io/cluster/minimal.example.com", "Value": "owned" }, { "Key": "kubernetes.io/role/elb", "Value": "1" } ] } }, "AWSEC2VPCDHCPOptionsAssociationminimalexamplecom": { "Type": "AWS::EC2::VPCDHCPOptionsAssociation", "Properties": { "VpcId": { "Ref": "AWSEC2VPCminimalexamplecom" }, "DhcpOptionsId": { "Ref": "AWSEC2DHCPOptionsminimalexamplecom" } } }, "AWSEC2VPCGatewayAttachmentminimalexamplecom": { "Type": "AWS::EC2::VPCGatewayAttachment", "Properties": { "VpcId": { "Ref": "AWSEC2VPCminimalexamplecom" }, "InternetGatewayId": { "Ref": "AWSEC2InternetGatewayminimalexamplecom" } } }, "AWSEC2VPCminimalexamplecom": { "Type": "AWS::EC2::VPC", "Properties": { "CidrBlock": "172.20.0.0/16", "EnableDnsHostnames": true, "EnableDnsSupport": true, "Tags": [ { "Key": "KubernetesCluster", "Value": "minimal.example.com" }, { "Key": "Name", "Value": "minimal.example.com" }, { "Key": "kubernetes.io/cluster/minimal.example.com", "Value": "owned" } ] } }, "AWSEC2Volumeustest1aetcdeventsminimalexamplecom": { "Type": "AWS::EC2::Volume", "Properties": { "AvailabilityZone": "us-test-1a", "Size": 20, "VolumeType": "gp2", "Encrypted": false, "Tags": [ { "Key": "KubernetesCluster", "Value": "minimal.example.com" }, { "Key": "Name", "Value": "us-test-1a.etcd-events.minimal.example.com" }, { "Key": "k8s.io/etcd/events", "Value": "us-test-1a/us-test-1a" }, { "Key": "k8s.io/role/master", "Value": "1" }, { "Key": "kubernetes.io/cluster/minimal.example.com", "Value": "owned" } ] } }, "AWSEC2Volumeustest1aetcdmainminimalexamplecom": { "Type": "AWS::EC2::Volume", "Properties": { "AvailabilityZone": "us-test-1a", "Size": 20, "VolumeType": "gp2", "Encrypted": false, "Tags": [ { "Key": "KubernetesCluster", "Value": "minimal.example.com" }, { "Key": "Name", "Value": "us-test-1a.etcd-main.minimal.example.com" }, { "Key": "k8s.io/etcd/main", "Value": "us-test-1a/us-test-1a" }, { "Key": "k8s.io/role/master", "Value": "1" }, { "Key": "kubernetes.io/cluster/minimal.example.com", "Value": "owned" } ] } }, "AWSIAMInstanceProfilemastersminimalexamplecom": { "Type": "AWS::IAM::InstanceProfile", "Properties": { "Roles": [ { "Ref": "AWSIAMRolemastersminimalexamplecom" } ] } }, "AWSIAMInstanceProfilenodesminimalexamplecom": { "Type": "AWS::IAM::InstanceProfile", "Properties": { "Roles": [ { "Ref": "AWSIAMRolenodesminimalexamplecom" } ] } }, "AWSIAMPolicymastersminimalexamplecom": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyName": "masters.minimal.example.com", "Roles": [ { "Ref": "AWSIAMRolemastersminimalexamplecom" } ], "PolicyDocument": { "Statement": [ { "Action": [ "ec2:*" ], "Effect": "Allow", "Resource": [ "*" ] }, { "Action": [ "autoscaling:DescribeAutoScalingGroups", "autoscaling:DescribeAutoScalingInstances", "autoscaling:DescribeLaunchConfigurations", "autoscaling:DescribeTags", "autoscaling:SetDesiredCapacity", "autoscaling:TerminateInstanceInAutoScalingGroup", "autoscaling:UpdateAutoScalingGroup", "ec2:DescribeLaunchTemplateVersions" ], "Effect": "Allow", "Resource": [ "*" ] }, { "Action": [ "elasticloadbalancing:*" ], "Effect": "Allow", "Resource": [ "*" ] }, { "Action": [ "iam:ListServerCertificates", "iam:GetServerCertificate" ], "Effect": "Allow", "Resource": [ "*" ] }, { "Action": [ "route53:ChangeResourceRecordSets", "route53:ListResourceRecordSets", "route53:GetHostedZone" ], "Effect": "Allow", "Resource": [ "arn:aws:route53:::hostedzone/Z1AFAKE1ZON3YO" ] }, { "Action": [ "route53:GetChange" ], "Effect": "Allow", "Resource": [ "arn:aws:route53:::change/*" ] }, { "Action": [ "route53:ListHostedZones" ], "Effect": "Allow", "Resource": [ "*" ] }, { "Action": [ "route53:ListHostedZones" ], "Effect": "Allow", "Resource": [ "*" ] }, { "Action": [ "ecr:GetAuthorizationToken", "ecr:BatchCheckLayerAvailability", "ecr:GetDownloadUrlForLayer", "ecr:GetRepositoryPolicy", "ecr:DescribeRepositories", "ecr:ListImages", "ecr:BatchGetImage" ], "Effect": "Allow", "Resource": [ "*" ] } ], "Version": "2012-10-17" } } }, "AWSIAMPolicynodesminimalexamplecom": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyName": "nodes.minimal.example.com", "Roles": [ { "Ref": "AWSIAMRolenodesminimalexamplecom" } ], "PolicyDocument": { "Statement": [ { "Action": [ "ec2:DescribeInstances", "ec2:DescribeRegions" ], "Effect": "Allow", "Resource": [ "*" ] }, { "Action": [ "route53:ChangeResourceRecordSets", "route53:ListResourceRecordSets", "route53:GetHostedZone" ], "Effect": "Allow", "Resource": [ "arn:aws:route53:::hostedzone/Z1AFAKE1ZON3YO" ] }, { "Action": [ "route53:GetChange" ], "Effect": "Allow", "Resource": [ "arn:aws:route53:::change/*" ] }, { "Action": [ "route53:ListHostedZones" ], "Effect": "Allow", "Resource": [ "*" ] }, { "Action": [ "route53:ListHostedZones" ], "Effect": "Allow", "Resource": [ "*" ] }, { "Action": [ "ecr:GetAuthorizationToken", "ecr:BatchCheckLayerAvailability", "ecr:GetDownloadUrlForLayer", "ecr:GetRepositoryPolicy", "ecr:DescribeRepositories", "ecr:ListImages", "ecr:BatchGetImage" ], "Effect": "Allow", "Resource": [ "*" ] } ], "Version": "2012-10-17" } } }, "AWSIAMRolemastersminimalexamplecom": { "Type": "AWS::IAM::Role", "Properties": { "RoleName": "masters.minimal.example.com", "AssumeRolePolicyDocument": { "Statement": [ { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": { "Service": "ec2.amazonaws.com" } } ], "Version": "2012-10-17" } } }, "AWSIAMRolenodesminimalexamplecom": { "Type": "AWS::IAM::Role", "Properties": { "RoleName": "nodes.minimal.example.com", "AssumeRolePolicyDocument": { "Statement": [ { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": { "Service": "ec2.amazonaws.com" } } ], "Version": "2012-10-17" } } } } }