added availability set config
parent
7894106e3b
commit
37b6d498d9
|
@ -188,7 +188,7 @@ The compute instances in this lab will be provisioned using [Ubuntu Server](http
|
|||
|
||||
### Kubernetes Controllers
|
||||
|
||||
Create three network interfaces and three compute instances which will host the Kubernetes control plane:
|
||||
Create three network interfaces and three compute instances (in an availability set) which will host the Kubernetes control plane:
|
||||
|
||||
```
|
||||
for i in 0 1 2; do
|
||||
|
@ -214,10 +214,14 @@ for i in 0 1 2; do
|
|||
done
|
||||
```
|
||||
```
|
||||
az vm availability-set create --name kubernetes-the-hard-way-as -g kubernetes-the-hard-way
|
||||
```
|
||||
```
|
||||
for i in 0 1 2; do
|
||||
az vm create \
|
||||
--name controller-${i} \
|
||||
--resource-group kubernetes-the-hard-way \
|
||||
--availability-set kubernetes-the-hard-way-as \
|
||||
--no-wait \
|
||||
--nics controller-${i}-nic \
|
||||
--image Canonical:UbuntuServer:18.04-LTS:latest \
|
||||
|
|
|
@ -179,9 +179,17 @@ NODE_PORT=$(kubectl get svc nginx \
|
|||
Create a firewall rule that allows remote access to the `nginx` node port:
|
||||
|
||||
```
|
||||
gcloud compute firewall-rules create kubernetes-the-hard-way-allow-nginx-service \
|
||||
--allow=tcp:${NODE_PORT} \
|
||||
--network kubernetes-the-hard-way
|
||||
az network nsg rule create \
|
||||
--resource-group kubernetes-the-hard-way
|
||||
--nsg-name kubernetes-the-hard-way-nsg
|
||||
--name nginx
|
||||
--access Allow
|
||||
--direction Inbound
|
||||
--priority 101
|
||||
--protocol Tcp
|
||||
--source-address-prefix Any
|
||||
--source-port-range "*"
|
||||
--destination-port-ranges ${NODE_PORT}
|
||||
```
|
||||
|
||||
Retrieve the external IP address of a worker instance:
|
||||
|
|
Loading…
Reference in New Issue