add internal load balancer for controlelrs

pull/79/head
khenidak 2016-09-30 06:49:08 +09:00
parent aaa136f487
commit c0d89731d4
1 changed files with 61 additions and 10 deletions

View File

@ -122,7 +122,7 @@ ssh-keygen -t rsa -f ./keys/cluster
### Storage Accounts ### Storage Accounts
Create storage account for control plane VMs Create storage account for control plane VMs (Etcd & Controllers)
``` ```
azure storage account create $controlPlaneStorageAccount \ azure storage account create $controlPlaneStorageAccount \
@ -152,7 +152,7 @@ azure storage account create $workersStorageAccount \
azure network nic create \ azure network nic create \
--resource-group the-hard-way \ --resource-group the-hard-way \
--name jumpbox-nic \ --name jumpbox-nic \
--private-ip-address "10.0.0.4" \ --private-ip-address "10.0.0.5" \
--subnet-vnet-name the-hard-way-net \ --subnet-vnet-name the-hard-way-net \
--subnet-name kubernetes \ --subnet-name kubernetes \
--public-ip-name the-hard-way-jumpbox \ --public-ip-name the-hard-way-jumpbox \
@ -284,6 +284,51 @@ azure vm create \
### Kubernetes Controllers ### Kubernetes Controllers
#### Workers Internal Load Balancer
Create load balancer
```
azure network lb create \
--resource-group the-hard-way \
--name the-hard-way-clb \
--location "West Us"
```
Create & the front-end IP to the internal load balancer
```
azure network lb frontend-ip create \
--resource-group the-hard-way \
--name the-hard-way-cfe \
--lb-name the-hard-way-clb \
--private-ip-address "10.0.0.4" \
--subnet-vnet-name the-hard-way-net \
--subnet-name kubernetes
```
Create a backend address pool for the load balancer
```
clbbackendPoolId=$(azure network lb address-pool create \
--resource-group the-hard-way \
--lb-name the-hard-way-clb \
--name backend-pool \
--json | jq -r '.id')
```
#### Create Controllers Availablity set
```
azure availset create \
--resource-group the-hard-way \
--name controllers-availset \
--location "West Us"
```
#### Controller 0 #### Controller 0
Create Nic Create Nic
@ -295,6 +340,7 @@ azure network nic create \
--private-ip-address "10.240.0.20" \ --private-ip-address "10.240.0.20" \
--subnet-vnet-name the-hard-way-net \ --subnet-vnet-name the-hard-way-net \
--subnet-name kubernetes \ --subnet-name kubernetes \
--lb-address-pool-ids $clbbackendPoolId \
--location "West Us" --location "West Us"
``` ```
@ -308,6 +354,7 @@ azure vm create \
--nic-name controller-0-nic \ --nic-name controller-0-nic \
--vnet-name the-hard-way-net \ --vnet-name the-hard-way-net \
--vnet-subnet-name kubernetes \ --vnet-subnet-name kubernetes \
--availset-name controllers-availset \
--os-type linux \ --os-type linux \
--image-urn $imageUrn \ --image-urn $imageUrn \
--storage-account-name $controlPlaneStorageAccount \ --storage-account-name $controlPlaneStorageAccount \
@ -329,6 +376,7 @@ azure network nic create \
--private-ip-address "10.240.0.21" \ --private-ip-address "10.240.0.21" \
--subnet-vnet-name the-hard-way-net \ --subnet-vnet-name the-hard-way-net \
--subnet-name kubernetes \ --subnet-name kubernetes \
--lb-address-pool-ids $clbbackendPoolId \
--location "West Us" --location "West Us"
``` ```
@ -342,6 +390,7 @@ azure vm create \
--nic-name controller-1-nic \ --nic-name controller-1-nic \
--vnet-name the-hard-way-net \ --vnet-name the-hard-way-net \
--vnet-subnet-name kubernetes \ --vnet-subnet-name kubernetes \
--availset-name controllers-availset \
--os-type linux \ --os-type linux \
--image-urn $imageUrn \ --image-urn $imageUrn \
--storage-account-name $controlPlaneStorageAccount \ --storage-account-name $controlPlaneStorageAccount \
@ -363,6 +412,7 @@ azure network nic create \
--private-ip-address "10.240.0.22" \ --private-ip-address "10.240.0.22" \
--subnet-vnet-name the-hard-way-net \ --subnet-vnet-name the-hard-way-net \
--subnet-name kubernetes \ --subnet-name kubernetes \
--lb-address-pool-ids $clbbackendPoolId \
--location "West Us" --location "West Us"
``` ```
@ -376,6 +426,7 @@ azure vm create \
--nic-names controller-2-nic \ --nic-names controller-2-nic \
--vnet-name the-hard-way-net \ --vnet-name the-hard-way-net \
--vnet-subnet-name kubernetes \ --vnet-subnet-name kubernetes \
--availset-name controllers-availset \
--os-type linux \ --os-type linux \
--image-urn $imageUrn \ --image-urn $imageUrn \
--storage-account-name $controlPlaneStorageAccount \ --storage-account-name $controlPlaneStorageAccount \
@ -389,7 +440,7 @@ azure vm create \
### Kubernetes Workers ### Kubernetes Workers
#### Load Balancer #### Workers External Load Balancer
Create public IP + DNS label for workers ingestion load balancer Create public IP + DNS label for workers ingestion load balancer
@ -426,7 +477,7 @@ azure network lb frontend-ip create \
Create a backend address pool for the load balancer Create a backend address pool for the load balancer
``` ```
backendPoolId=$(azure network lb address-pool create \ wlbbackendPoolId=$(azure network lb address-pool create \
--resource-group the-hard-way \ --resource-group the-hard-way \
--lb-name the-hard-way-lb \ --lb-name the-hard-way-lb \
--name backend-pool \ --name backend-pool \
@ -454,7 +505,7 @@ azure network nic create \
--subnet-vnet-name the-hard-way-net \ --subnet-vnet-name the-hard-way-net \
--subnet-name kubernetes \ --subnet-name kubernetes \
--enable-ip-forwarding "true" \ --enable-ip-forwarding "true" \
--lb-address-pool-ids $backendPoolId \ --lb-address-pool-ids $wlbbackendPoolId \
--location "West Us" --location "West Us"
``` ```
@ -491,7 +542,7 @@ azure network nic create \
--subnet-vnet-name the-hard-way-net \ --subnet-vnet-name the-hard-way-net \
--subnet-name kubernetes \ --subnet-name kubernetes \
--enable-ip-forwarding "true" \ --enable-ip-forwarding "true" \
--lb-address-pool-ids $backendPoolId \ --lb-address-pool-ids $wlbbackendPoolId \
--location "West Us" --location "West Us"
``` ```
@ -528,7 +579,7 @@ azure network nic create \
--subnet-vnet-name the-hard-way-net \ --subnet-vnet-name the-hard-way-net \
--subnet-name kubernetes \ --subnet-name kubernetes \
--enable-ip-forwarding "true" \ --enable-ip-forwarding "true" \
--lb-address-pool-ids $backendPoolId \ --lb-address-pool-ids $wlbbackendPoolId \
--location "West Us" --location "West Us"
``` ```