add support for AWS

This commit is contained in:
Kelsey Hightower
2016-09-11 02:40:34 -07:00
parent 5d794d8280
commit ed7b9fc2da
2 changed files with 184 additions and 4 deletions

View File

@@ -18,6 +18,12 @@ VPC_ID=$(aws ec2 create-vpc \
jq -r '.Vpc.VpcId')
```
```
aws ec2 create-tags \
--resources ${VPC_ID} \
--tags Key=Name,Value=kubernetes
```
```
aws ec2 modify-vpc-attribute \
--vpc-id ${VPC_ID} \
@@ -37,6 +43,12 @@ DHCP_OPTION_SET_ID=$(aws ec2 create-dhcp-options \
jq -r '.DhcpOptions.DhcpOptionsId')
```
```
aws ec2 create-tags \
--resources ${DHCP_OPTION_SET_ID} \
--tags Key=Name,Value=kubernetes
```
```
aws ec2 associate-dhcp-options \
--dhcp-options-id ${DHCP_OPTION_SET_ID} \
@@ -52,6 +64,12 @@ SUBNET_ID=$(aws ec2 create-subnet \
jq -r '.Subnet.SubnetId')
```
```
aws ec2 create-tags \
--resources ${SUBNET_ID} \
--tags Key=Name,Value=kubernetes
```
Create an internet gateway
```
@@ -59,6 +77,12 @@ INTERNET_GATEWAY_ID=$(aws ec2 create-internet-gateway | \
jq -r '.InternetGateway.InternetGatewayId')
```
```
aws ec2 create-tags \
--resources ${INTERNET_GATEWAY_ID} \
--tags Key=Name,Value=kubernetes
```
```
aws ec2 attach-internet-gateway \
--internet-gateway-id ${INTERNET_GATEWAY_ID} \
@@ -73,6 +97,12 @@ ROUTE_TABLE_ID=$(aws ec2 create-route-table \
jq -r '.RouteTable.RouteTableId')
```
```
aws ec2 create-tags \
--resources ${ROUTE_TABLE_ID} \
--tags Key=Name,Value=kubernetes
```
```
aws ec2 associate-route-table \
--route-table-id ${ROUTE_TABLE_ID} \
@@ -96,6 +126,12 @@ SECURITY_GROUP_ID=$(aws ec2 create-security-group \
jq -r '.GroupId')
```
```
aws ec2 create-tags \
--resources ${SECURITY_GROUP_ID} \
--tags Key=Name,Value=kubernetes
```
```
aws ec2 authorize-security-group-ingress \
--group-id ${SECURITY_GROUP_ID} \