From c64bac4284fa9e9008597b24ffe3adb8818a4ee6 Mon Sep 17 00:00:00 2001 From: Xander Grzywinski Date: Fri, 24 May 2019 12:30:44 -0700 Subject: [PATCH] updated lb setup --- docs/03-compute-resources.md | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/docs/03-compute-resources.md b/docs/03-compute-resources.md index 33fd36e..fd7be7f 100644 --- a/docs/03-compute-resources.md +++ b/docs/03-compute-resources.md @@ -161,14 +161,16 @@ az network lb create \ --resource-group kubernetes-the-hard-way \ --backend-pool-name kubernetes-the-hard-way-lb-pool \ --public-ip-address kubernetes-the-hard-way-ip - +``` +``` az network lb probe create \ --lb-name kubernetes-the-hard-way-lb \ --resource-group kubernetes-the-hard-way \ --name kubernetes-the-hard-way-lb-probe \ --port 80 \ --protocol tcp - +``` +``` az network lb rule create \ --resource-group kubernetes-the-hard-way \ --lb-name kubernetes-the-hard-way-lb \ @@ -188,6 +190,14 @@ The compute instances in this lab will be provisioned using [Ubuntu Server](http Create three network interfaces and three compute instances which will host the Kubernetes control plane: +``` +for i in 0 1 2; do + az network public-ip create \ + --name controller-${i}-ip \ + --resource-group kubernetes-the-hard-way \ + --allocation-method Static +done +``` ``` for i in 0 1 2; do az network nic create \ @@ -196,6 +206,7 @@ for i in 0 1 2; do --vnet-name kubernetes-the-hard-way-vnet \ --subnet kubernetes-the-hard-way-subnet \ --network-security-group kubernetes-the-hard-way-nsg \ + --public-ip-address controller-${i}-ip --private-ip-address 10.240.0.1${i} \ --lb-name kubernetes-the-hard-way-lb \ --lb-address-pools kubernetes-the-hard-way-lb-pool \ @@ -226,6 +237,14 @@ Each worker instance requires a pod subnet allocation from the Kubernetes cluste Create three compute instances which will host the Kubernetes worker nodes: +``` +for i in 0 1 2; do + az network public-ip create \ + --name worker-${i}-ip \ + --resource-group kubernetes-the-hard-way \ + --allocation-method Static +done +``` ``` for i in 0 1 2; do az network nic create \ @@ -234,6 +253,7 @@ for i in 0 1 2; do --vnet-name kubernetes-the-hard-way-vnet \ --subnet kubernetes-the-hard-way-subnet \ --network-security-group kubernetes-the-hard-way-nsg \ + --public-ip worker-${i}-ip --private-ip-address 10.240.0.2${i} \ --ip-forwarding true done @@ -245,7 +265,6 @@ for i in 0 1 2; do --resource-group kubernetes-the-hard-way --no-wait \ --nics worker-${i}-nic - --public-ip-address-allocation Static --image Canonical:UbuntuServer:18.04-LTS:latest --admin-username azureuser --generate-ssh-keys