finished chapter 11

pull/709/head
Xander Grzywinski 2019-05-28 10:41:25 -07:00
parent 0994ce64e3
commit afffdb09de
2 changed files with 12 additions and 20 deletions

View File

@ -254,7 +254,8 @@ for i in 0 1 2; do
--network-security-group kubernetes-the-hard-way-nsg \
--public-ip worker-${i}-ip \
--private-ip-address 10.240.0.2${i} \
--ip-forwarding true
--ip-forwarding true \
--tags podCidr=10.200.${i}.0/24
done
```
```
@ -269,7 +270,7 @@ for i in 0 1 2; do
--generate-ssh-keys \
--size Standard_B2s \
--data-disk-sizes-gb 200 \
--tags pod-cidr=10.200.${i}.0/24
--tags podCidr=10.200.${i}.0/24
done
```

View File

@ -10,21 +10,10 @@ In this lab you will create a route for each worker node that maps the node's Po
In this section you will gather the information required to create routes in the `kubernetes-the-hard-way` VPC network.
Print the internal IP address and Pod CIDR range for each worker instance:
Create the Azure route table
```
for instance in worker-0 worker-1 worker-2; do
gcloud compute instances describe ${instance} \
--format 'value[separator=" "](networkInterfaces[0].networkIP,metadata.items[0].value)'
done
```
> output
```
10.240.0.20 10.200.0.0/24
10.240.0.21 10.200.1.0/24
10.240.0.22 10.200.2.0/24
az network route-table create --group kubernetes-the-hard-way --name kubernetes-the-hard-way-rt
```
## Routes
@ -33,17 +22,19 @@ Create network routes for each worker instance:
```
for i in 0 1 2; do
gcloud compute routes create kubernetes-route-10-200-${i}-0-24 \
--network kubernetes-the-hard-way \
--next-hop-address 10.240.0.2${i} \
--destination-range 10.200.${i}.0/24
az network route-table route create \
--resource-group kubernetes-the-hard-way \
--name kubernetes-the-hard-way-route-10-200-${i}-0-24 \
--route-table-name kubernetes-the-hard-way-rt \
--next-hop-type VnetLocal
--next-hop-ip-address 10.240.0.2${i}
done
```
List the routes in the `kubernetes-the-hard-way` VPC network:
```
gcloud compute routes list --filter "network: kubernetes-the-hard-way"
az network route-table route list --resource-group kubernetes-the-hard-way --route-table-name kubernetes-the-hard-way-rt
```
> output