mirror of
https://github.com/kelseyhightower/kubernetes-the-hard-way.git
synced 2025-12-16 01:38:58 +03:00
add support for AWS
This commit is contained in:
@@ -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} \
|
||||
|
||||
Reference in New Issue
Block a user