finished chapter 11
parent
0994ce64e3
commit
afffdb09de
|
@ -254,7 +254,8 @@ for i in 0 1 2; do
|
||||||
--network-security-group kubernetes-the-hard-way-nsg \
|
--network-security-group kubernetes-the-hard-way-nsg \
|
||||||
--public-ip worker-${i}-ip \
|
--public-ip worker-${i}-ip \
|
||||||
--private-ip-address 10.240.0.2${i} \
|
--private-ip-address 10.240.0.2${i} \
|
||||||
--ip-forwarding true
|
--ip-forwarding true \
|
||||||
|
--tags podCidr=10.200.${i}.0/24
|
||||||
done
|
done
|
||||||
```
|
```
|
||||||
```
|
```
|
||||||
|
@ -269,7 +270,7 @@ for i in 0 1 2; do
|
||||||
--generate-ssh-keys \
|
--generate-ssh-keys \
|
||||||
--size Standard_B2s \
|
--size Standard_B2s \
|
||||||
--data-disk-sizes-gb 200 \
|
--data-disk-sizes-gb 200 \
|
||||||
--tags pod-cidr=10.200.${i}.0/24
|
--tags podCidr=10.200.${i}.0/24
|
||||||
done
|
done
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -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.
|
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
|
az network route-table create --group kubernetes-the-hard-way --name kubernetes-the-hard-way-rt
|
||||||
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
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Routes
|
## Routes
|
||||||
|
@ -33,17 +22,19 @@ Create network routes for each worker instance:
|
||||||
|
|
||||||
```
|
```
|
||||||
for i in 0 1 2; do
|
for i in 0 1 2; do
|
||||||
gcloud compute routes create kubernetes-route-10-200-${i}-0-24 \
|
az network route-table route create \
|
||||||
--network kubernetes-the-hard-way \
|
--resource-group kubernetes-the-hard-way \
|
||||||
--next-hop-address 10.240.0.2${i} \
|
--name kubernetes-the-hard-way-route-10-200-${i}-0-24 \
|
||||||
--destination-range 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
|
done
|
||||||
```
|
```
|
||||||
|
|
||||||
List the routes in the `kubernetes-the-hard-way` VPC network:
|
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
|
> output
|
||||||
|
|
Loading…
Reference in New Issue