fixed load balancer config

pull/709/head
Xander Grzywinski 2019-05-24 12:20:47 -07:00
parent 01cceca8b5
commit 3f39873d44
1 changed files with 29 additions and 36 deletions

View File

@ -156,16 +156,11 @@ In this section you will provision an external load balancer to front the Kubern
Create the external load balancer network resources: Create the external load balancer network resources:
``` ```
{
KUBERNETES_PUBLIC_ADDRESS=$(az network public-ip show -g kubernetes-the-hard-way -n kubernetes-the-hard-way-ip --output tsv | cut -f6)
az network lb create \ az network lb create \
--name kubernetes-the-hard-way-lb \ --name kubernetes-the-hard-way-lb \
--resource-group kubernetes-the-hard-way \ --resource-group kubernetes-the-hard-way \
--backend-pool-name kubernetes-the-hard-way-lb-pool \ --backend-pool-name kubernetes-the-hard-way-lb-pool \
--public-ip-address kubernetes-the-hard-way-ip \ --public-ip-address kubernetes-the-hard-way-ip
--vent-name kubernetes-the-hard-way-vnet \
--subnet kubernetes-the-hard-way-subnet \
az network lb probe create \ az network lb probe create \
--lb-name kubernetes-the-hard-way-lb \ --lb-name kubernetes-the-hard-way-lb \
@ -181,10 +176,8 @@ Create the external load balancer network resources:
--protocol tcp \ --protocol tcp \
--frontend-port 6443 \ --frontend-port 6443 \
--backend-port 6443 \ --backend-port 6443 \
--frontend-ip-name kubernetes-the-hard-way-ip \
--backend-pool-name kubernetes-the-hard-way-lb-pool \ --backend-pool-name kubernetes-the-hard-way-lb-pool \
--probe-name kubernetes-the-hard-way-lb-probe --probe-name kubernetes-the-hard-way-lb-probe
}
``` ```
## Compute Instances ## Compute Instances
@ -199,7 +192,7 @@ Create three network interfaces and three compute instances which will host the
for i in 0 1 2; do for i in 0 1 2; do
az network nic create \ az network nic create \
--resource-group kubernetes-the-hard-way \ --resource-group kubernetes-the-hard-way \
--name controller-${i}-nic --name controller-${i}-nic \
--vnet-name kubernetes-the-hard-way-vnet \ --vnet-name kubernetes-the-hard-way-vnet \
--subnet kubernetes-the-hard-way-subnet \ --subnet kubernetes-the-hard-way-subnet \
--network-security-group kubernetes-the-hard-way-nsg \ --network-security-group kubernetes-the-hard-way-nsg \
@ -213,13 +206,14 @@ done
for i in 0 1 2; do for i in 0 1 2; do
az vm create \ az vm create \
--name controller-${i} \ --name controller-${i} \
--resource-group kubernetes-the-hard-way --resource-group kubernetes-the-hard-way \
--no-wait \ --no-wait \
--nics controller-${i}-nic --nics controller-${i}-nic \
--image Canonical:UbuntuServer:18.04-LTS:latest --public-ip-address-allocation Static
--admin-username azureuser --image Canonical:UbuntuServer:18.04-LTS:latest \
--generate-ssh-keys --admin-username azureuser \
--size Standard_B2s --generate-ssh-keys \
--size Standard_B2s \
--data-disk-sizes-gb 200 --data-disk-sizes-gb 200
done done
``` ```
@ -241,8 +235,6 @@ for i in 0 1 2; do
--subnet kubernetes-the-hard-way-subnet \ --subnet kubernetes-the-hard-way-subnet \
--network-security-group kubernetes-the-hard-way-nsg \ --network-security-group kubernetes-the-hard-way-nsg \
--private-ip-address 10.240.0.2${i} \ --private-ip-address 10.240.0.2${i} \
--lb-name kubernetes-the-hard-way-lb \
--lb-address-pools kubernetes-the-hard-way-lb-pool \
--ip-forwarding true --ip-forwarding true
done done
``` ```
@ -253,6 +245,7 @@ for i in 0 1 2; do
--resource-group kubernetes-the-hard-way --resource-group kubernetes-the-hard-way
--no-wait \ --no-wait \
--nics worker-${i}-nic --nics worker-${i}-nic
--public-ip-address-allocation Static
--image Canonical:UbuntuServer:18.04-LTS:latest --image Canonical:UbuntuServer:18.04-LTS:latest
--admin-username azureuser --admin-username azureuser
--generate-ssh-keys --generate-ssh-keys