mirror of
https://github.com/kelseyhightower/kubernetes-the-hard-way.git
synced 2025-12-18 02:38:58 +03:00
split subnets to allow UDR to work + completed all configs
This commit is contained in:
@@ -79,6 +79,52 @@ NODE_PUBLIC_IP=$(aws ec2 describe-instances \
|
||||
jq -j '.Reservations[].Instances[].PublicIpAddress')
|
||||
```
|
||||
|
||||
#### Azure
|
||||
|
||||
```
|
||||
# Get the fqdn for the public worker ingestion load balancer
|
||||
|
||||
NODE_PUBLIC_IP=$(azure network public-ip show \
|
||||
--resource-group the-hard-way \
|
||||
--name the-hard-way-workers \
|
||||
--json | jq -r '.dnsSettings.fqdn')
|
||||
|
||||
# Add NSG rule to enable traffic to node ports
|
||||
|
||||
azure network nsg rule create \
|
||||
--resource-group the-hard-way \
|
||||
--nsg-name the-hard-way-nsg \
|
||||
--name allow-internet-$NODE_PORT \
|
||||
--protocol tcp \
|
||||
--access allow \
|
||||
--source-address-prefix Internet \
|
||||
--destination-address-prefix 10.240.0.0/16 \
|
||||
--destination-port-range $NODE_PORT \
|
||||
--priority 110 \
|
||||
--direction inbound
|
||||
|
||||
# Create balancing rules NODE_PORT:NODE_PORT on the load balancer
|
||||
|
||||
azure network lb probe create \
|
||||
--resource-group the-hard-way \
|
||||
--lb-name the-hard-way-lb \
|
||||
--name nginx-app-health \
|
||||
--interval 5 \
|
||||
--port $NODE_PORT \
|
||||
--protocol tcp
|
||||
|
||||
|
||||
azure network lb rule create \
|
||||
--resource-group the-hard-way \
|
||||
--lb-name the-hard-way-lb \
|
||||
--name nginx-app \
|
||||
--frontend-port $NODE_PORT \
|
||||
--backend-port $NODE_PORT \
|
||||
--frontend-ip-name the-hard-way-fe \
|
||||
--backend-address-pool-name backend-pool\
|
||||
--probe-name nginx-app-health
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Test the nginx service using cURL:
|
||||
|
||||
Reference in New Issue
Block a user