From afffdb09deadd6f10bc62e40176834f2b5f19a64 Mon Sep 17 00:00:00 2001 From: Xander Grzywinski Date: Tue, 28 May 2019 10:41:25 -0700 Subject: [PATCH] finished chapter 11 --- docs/03-compute-resources.md | 5 +++-- docs/11-pod-network-routes.md | 27 +++++++++------------------ 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/docs/03-compute-resources.md b/docs/03-compute-resources.md index 148e7a4..0ecc8e0 100644 --- a/docs/03-compute-resources.md +++ b/docs/03-compute-resources.md @@ -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 ``` diff --git a/docs/11-pod-network-routes.md b/docs/11-pod-network-routes.md index c9f0b6a..9223315 100644 --- a/docs/11-pod-network-routes.md +++ b/docs/11-pod-network-routes.md @@ -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