Google cloud internal lb
Материал из noname.com.ua
Версия от 09:17, 30 октября 2023; Sirmax (обсуждение | вклад)
Instance Group
gcloud compute \ instance-groups unmanaged \ create consul-ig \ --zone us-central1-b
NAME LOCATION SCOPE NETWORK MANAGED INSTANCES consul-ig us-central1-b zone 0
gcloud compute \ instance-groups set-named-ports consul-ig \ --named-ports "consul-8300:8300,consul-8301:8301,consul-8302:8302,consul-8400:8400,consul-8500:8500,consul-8600:8600"
gcloud compute instance-groups describe consul-ig creationTimestamp: '2017-02-20T01:57:22.904-08:00' description: '' fingerprint: i-B17zEMY3w= id: '6384490727661306733' isManaged: 'No' kind: compute#instanceGroup name: consul-ig namedPorts: - name: consul-8300 port: 8300 - name: consul-8301 port: 8301 - name: consul-8302 port: 8302 - name: consul-8400 port: 8400 - name: consul-8500 port: 8500 - name: consul-8600 port: 8600
gcloud compute \ instance-groups unmanaged \ add-instances consul-ig \ --instances \ consul-tf-0,consul-tf-1,consul-tf-2 \ --zone us-central1-b
Health Check
gcloud compute \ health-checks \ create tcp consul-tcp-health-check \ --port 8500
NAME PROTOCOL consul-tcp-health-check TCP
Backend Service
gcloud compute \ backend-services create consul-backend-service \ --load-balancing-scheme internal \ --region us-central1 \ --health-checks consul-tcp-health-check
gcloud compute backend-services add-backend consul-backend-service\ --instance-group consul-ig \ --instance-group-zone us-central1-b \ --region us-central1
Forwarding Rule
gcloud compute \ forwarding-rules create consul-forwarding-rule \ --address 10.206.249.54 \ --load-balancing-scheme internal \ --ports 8300,8500 \ --network kohls-ecom-nonprod \ --subnet kohl-ecom-nonprod-network01 \ --region us-central1 \ --backend-service consul-backend-service