การเชื่อมโยงอย่างชัดเจนของตัวจัดสรรภาระงาน GCP L7 กับ PSC

1. บทนำ

กลุ่มปลายทางเครือข่าย (NEG) ของ Private Service Connect (PSC) รองรับการเชื่อมโยงตัวจัดสรรภาระงาน HTTPS ภายในกับตัวจัดสรรภาระงาน HTTPS ภายนอก ซึ่งจะให้การตรวจสอบสถานะแบบกระจายและการรับส่งข้อมูลใน Data Plane ไปยัง On-Prem โดยใช้ช่วงที่ลูกค้ากำหนด นอกจากนี้ โทโพโลยีนี้ยังรองรับ VPC หลายรายการที่เชื่อมต่อกับ On-Prem ผ่าน Interconnect ระดับภูมิภาคหลายรายการด้วย

ใน Codelab นี้ เราจะสาธิตวิธีกำหนดค่าตั้งแต่ต้นทางถึงปลายทางตามโทโพโลยีด้านล่าง จากซ้ายไปขวา ลูกค้าภายในองค์กรมี VM เพื่อจำลองบริการ HTTP ใช้ประโยชน์จากการเชื่อมต่อแบบไฮบริด (HA-VPN หรือ InterConnect) และ Hybrid NEG เพื่อแสดงผ่านตัวจัดสรรภาระงาน HTTPS ภายใน PSC ใช้ HTTPS LB ภายในเป็นไฟล์แนบบริการ PSC NEG จะใช้การเชื่อมต่อเป็นบริการแบ็กเอนด์ที่แสดงต่อ HTTPS LB ภายนอก ผู้ใช้อินเทอร์เน็ตสามารถใช้เครือข่ายทั่วโลกของ Google เพื่อเร่งการเข้าถึงบริการ HTTP ในองค์กร

e3f26d8497323a42.png

รูปที่ 1 Private Service Connect ใช้กลุ่มอุปกรณ์ปลายทางของเครือข่ายและการเชื่อมต่อบริการเพื่อเชื่อมต่อตัวจัดสรรภาระงาน HTTPS ภายนอกกับตัวจัดสรรภาระงาน HTTPS ภายใน และขยายแบ็กเอนด์ไปยังองค์กร

สิ่งที่คุณจะได้เรียนรู้

  • ตัวจัดสรรภาระงาน HTTPS ภายในที่มี Hybrid NEG และการตรวจสอบประสิทธิภาพการทำงานแบบกระจาย
  • ไฟล์แนบบริการ PSC ที่มีตัวจัดสรรภาระงาน HTTPS ภายใน
  • การตั้งค่ากลุ่มปลายทางเครือข่าย PSC
  • แสดง NEG ของ PSC ด้วยตัวจัดสรรภาระงาน HTTPS ภายนอก

สิ่งที่คุณต้องมี

  • ความรู้เกี่ยวกับการเชื่อมต่อแบบผสม เช่น HA-VPN
  • ความรู้เกี่ยวกับการจัดสรรภาระงาน HTTPS ภายใน/ภายนอก
  • ความรู้เกี่ยวกับ Private Service Connect

2. ก่อนเริ่มต้น

หมายเหตุ: Codelab มีขั้นตอนการกำหนดค่าและการตรวจสอบตามโทโพโลยีที่แสดงไว้ ให้แก้ไขขั้นตอนตามที่จำเป็นเพื่อให้เป็นไปตามข้อกำหนดขององค์กร สิทธิ์ IAM ไม่อยู่ในขอบเขตของโค้ดแล็บ

Codelab จะใช้โปรเจ็กต์เดียวเพื่อจำลองกระบวนการทั้งหมด นอกจากนี้ยังรองรับหลายโปรเจ็กต์ด้วย

โปรเจ็กต์เดียว - อัปเดตโปรเจ็กต์ให้รองรับเครือข่ายผู้ผลิตและผู้บริโภค

ตรวจสอบว่าได้ตั้งค่ารหัสโปรเจ็กต์ใน Cloud Shell แล้ว

gcloud config list project
gcloud config set project [YOUR-PROJECT-NAME]
prodproject=YOUR-PROJECT-NAME
echo $prodproject

3. สร้างทรัพยากรในองค์กร

ในส่วนต่อไปนี้ เราจะตั้งค่า VPC และ VM ในองค์กรเพื่อจำลองบริการในองค์กรของลูกค้า

เครือข่าย VPC

จาก Cloud Shell

gcloud compute networks create vpc-demo-onprem --project=$prodproject --subnet-mode=custom

สร้างซับเน็ต

จาก Cloud Shell

gcloud compute networks subnets create vpc-demo-onprem-asia-southeast1 --project=$prodproject --range=10.0.0.0/24 --network=vpc-demo-onprem --region=asia-southeast1

สร้างกฎไฟร์วอลล์

ตัวจัดสรรภาระงาน HTTPS ภายในรองรับการตรวจสอบประสิทธิภาพการทำงานแบบกระจาย กฎไฟร์วอลล์จึงต้องอนุญาตช่วง IP ของซับเน็ตพร็อกซีเท่านั้น ทำตามเอกสารเพื่อเพิ่มโปรเจ็กต์ลงในรายการที่อนุญาต

สร้างกฎไฟร์วอลล์จาก Cloud Shell เพื่อเปิดใช้การตรวจสอบสถานะของแบ็กเอนด์และการรับส่งข้อมูลใน Data Plane จากเครือข่ายย่อยของพร็อกซี

gcloud compute firewall-rules create vpc-demo-health-checks --allow tcp:80,tcp:443 --network vpc-demo-onprem --source-ranges 10.0.3.0/24 --enable-logging

จาก Cloud Shell ให้สร้างกฎไฟร์วอลล์เพื่ออนุญาตให้ IAP เชื่อมต่อกับอินสแตนซ์ VM

gcloud compute firewall-rules create psclab-iap-prod --network vpc-demo-onprem --allow tcp:22 --source-ranges=35.235.240.0/20 --enable-logging

4. สร้างอินสแตนซ์ VM ในองค์กร

VM นี้จำลองบริการในองค์กร และต้องเปิดเผยด้วยตัวจัดสรรภาระงาน HTTPS ภายในโดยใช้ NEG แบบไฮบริด

สร้างอินสแตนซ์ www01 จาก Cloud Shell

gcloud compute instances create www01 \
    --zone=asia-southeast1-b \
    --image-family=debian-11 \
    --image-project=debian-cloud \
    --network-interface=network-tier=PREMIUM,nic-type=GVNIC,stack-type=IPV4_ONLY,subnet=vpc-demo-onprem-asia-southeast1 \
    --shielded-secure-boot \
    --shielded-vtpm \
    --shielded-integrity-monitoring \
    --metadata=startup-script='#! /bin/bash
sudo apt-get update
sudo apt-get install nginx -y
vm_hostname="$(curl -H "Metadata-Flavor:Google" \
http://169.254.169.254/computeMetadata/v1/instance/name)"
filter="{print \$NF}"
vm_zone="$(curl -H "Metadata-Flavor:Google" \
http://169.254.169.254/computeMetadata/v1/instance/zone \
| awk -F/ "${filter}")"
echo "Page on $vm_hostname in $vm_zone" | \
tee /var/www/html/index.nginx-debian.html
sudo systemctl restart nginx'

ในส่วนต่อไปนี้ เราจะใช้ letsencrypt เพื่อสร้างใบรับรองและติดตั้งใน Nginx ดาวน์โหลดไฟล์คีย์สาธารณะและส่วนตัวสำหรับขั้นตอนถัดไป คุณต้องเปิดพอร์ต TCP 80 ไปยังอินเทอร์เน็ตชั่วคราวเพื่อสร้างใบรับรอง

ตรวจสอบว่า VM นี้มีชื่อโดเมนที่ได้รับการแก้ไขแบบสาธารณะ เช่น ใน Cloud DNS ให้เพิ่มระเบียน A [www01.yinghli.demo.altostrat.com](http://www01.yinghli.demo.altostrat.com) และชี้ไปยังที่อยู่ IP สาธารณะของ VM

gcloud dns --project=$prodproject record-sets create www01.yinghli.demo.altostrat.com. --zone="yinghli-demo" --type="A" --ttl="300" --rrdatas="34.87.77.186"

จากคอนโซล VM www01 ให้ทำตามคำแนะนำเพื่อติดตั้งใบรับรองใน Nginx และทำสำเนา fullchain.pem และ private.pem สำหรับขั้นตอนต่อไป

sudo apt install snapd
sudo snap install core; sudo snap refresh core
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
sudo certbot --nginx

5. สร้างเครือข่าย VPC ของผู้ผลิต

หมายเหตุ: การกำหนดค่าเครือข่ายแบบไฮบริดไม่รวมอยู่ในการกำหนดค่านี้

เครือข่าย VPC

จาก Cloud Shell

gcloud compute networks create vpc-demo-producer --project=$prodproject --subnet-mode=custom

สร้างซับเน็ต

จาก Cloud Shell

gcloud compute networks subnets create vpc-demo-asia-southeast1 --project=$prodproject --range=10.0.2.0/24 --network=vpc-demo-producer --region=asia-southeast1

สร้างซับเน็ตพร็อกซี

จาก Cloud Shell

gcloud compute networks subnets create proxy-subnet-asia-southeast1 \
  --purpose=REGIONAL_MANAGED_PROXY \
  --role=ACTIVE \
  --region=asia-southeast1 \
  --network=vpc-demo-producer \
  --range=10.0.3.0/24

การเชื่อมต่อแบบไฮบริด

ทำตามเอกสารประกอบของ Cloud VPN เพื่อใช้การเชื่อมต่อ HA-VPN ระหว่าง VPC ภายในองค์กรและ VPC ของผู้ผลิต คงการกำหนดค่าเริ่มต้นไว้ใน Cloud Router เราไม่จำเป็นต้องเพิ่ม 130.211.0.0/22, 35.191.0.0/16 ลงในการโฆษณา BGP

6. สร้าง NEG แบบไฮบริดสำหรับผู้ผลิต

สร้างกลุ่มปลายทางเครือข่ายแบบไฮบริดและเพิ่ม IP:PORT ของ VM ภายในองค์กรลงใน NEG

จาก Cloud Shell

gcloud compute network-endpoint-groups create on-prem-service-neg \
    --network-endpoint-type=NON_GCP_PRIVATE_IP_PORT \
    --zone=asia-southeast1-b \
    --network=vpc-demo-producer

gcloud compute network-endpoint-groups update on-prem-service-neg \
    --zone=asia-southeast1-b \
    --add-endpoint="ip=10.0.0.2,port=443"

7. สร้างตัวจัดสรรภาระงาน HTTPS ภายในของผู้ผลิต

ปัจจุบันตัวจัดสรรภาระงาน HTTPS ภายนอกรองรับเฉพาะโปรโตคอล HTTPS สำหรับ NEG ของ PSC( docs) เมื่อเผยแพร่บริการ เราต้องใช้ตัวจัดสรรภาระงาน HTTPS ภายในและเปิดใช้การเข้าถึงทั่วโลกของกฎการส่งต่อ

สร้างการตรวจสอบประสิทธิภาพการทำงานระดับภูมิภาคจาก Cloud Shell

gcloud compute health-checks create https on-prem-service-hc \
    --region=asia-southeast1 \
    --use-serving-port

สร้างบริการแบ็กเอนด์และเพิ่ม Hybrid NEG จาก Cloud Shell

gcloud compute backend-services create on-premise-service-backend \
   --load-balancing-scheme=INTERNAL_MANAGED \
   --protocol=HTTPS \
   --region=asia-southeast1 \
   --health-checks=on-prem-service-hc \
   --health-checks-region=asia-southeast1

gcloud compute backend-services add-backend on-premise-service-backend \
   --network-endpoint-group=on-prem-service-neg \
   --network-endpoint-group-zone=asia-southeast1-b \
   --region=asia-southeast1 \
   --balancing-mode=RATE \
   --max-rate-per-endpoint=100

สร้างแมป URL จาก Cloud Shell

gcloud compute url-maps create on-premise-url \
    --default-service on-premise-service-backend \
    --region=asia-southeast1

สร้างใบรับรอง SSL ระดับภูมิภาคจาก Cloud Shell ระบบจะดาวน์โหลดไฟล์ใบรับรอง 2 ไฟล์จาก VM

gcloud compute ssl-certificates create www01 \
    --certificate=fullchain.pem \
    --private-key=private.pem \
    --region=asia-southeast1

สร้าง https-target-proxy จาก Cloud Shell

gcloud compute target-https-proxies create on-premise-httpsproxy \
    --ssl-certificates=www01 \
    --url-map=on-premise-url \
    --url-map-region=asia-southeast1 \
    --region=asia-southeast1

จาก Cloud Shell ให้สำรอง IP แบบคงที่ภายในและสร้างกฎการส่งต่อ

gcloud compute addresses create ilbaddress \
  --region=asia-southeast1 \
  --subnet=vpc-demo-asia-southeast1  \
  --addresses=10.0.2.100 

gcloud compute forwarding-rules create https-ilb-psc \
      --load-balancing-scheme=INTERNAL_MANAGED \
      --network=vpc-demo-producer \
      --subnet=vpc-demo-asia-southeast1  \
      --address=ilbaddress \
      --ports=443 \
      --region=asia-southeast1 \
      --target-https-proxy=on-premise-httpsproxy \
      --target-https-proxy-region=asia-southeast1
      --allow-global-access

8. สร้างอินสแตนซ์ VM ของ Producer

สร้าง VM ของโปรดิวเซอร์เพื่อการยืนยัน

จาก Cloud Shell

gcloud compute instances create test01 \
    --zone=asia-southeast1-b \
    --image-family=debian-11 \
    --image-project=debian-cloud \
    --network-interface=network-tier=PREMIUM,nic-type=GVNIC,stack-type=IPV4_ONLY,subnet=vpc-demo-asia-southeast1 \
    --shielded-secure-boot \
    --shielded-vtpm \
    --shielded-integrity-monitoring

หากต้องการอนุญาตให้ IAP เชื่อมต่อกับอินสแตนซ์ VM ให้สร้างกฎไฟร์วอลล์ที่มีลักษณะดังนี้

จาก Cloud Shell

gcloud compute firewall-rules create psclab-iap-prod --network vpc-demo-producer --allow tcp:22 --source-ranges=35.235.240.0/20 --enable-logging

จากคอนโซล VM ของผู้ผลิต ให้เข้าถึง [www01.yinghli.demo.altostrat.com](https://www01.yinghli.demo.altostrat.com) และแก้ไขที่อยู่ IP ของตัวจัดสรรภาระงาน HTTPS ภายใน HTTP 200 แสดงว่าการกำหนดค่าทำงานได้ตามที่คาดไว้

curl -v --resolve www01.yinghli.demo.altostrat.com:443:10.0.2.100 https://www01.yinghli.demo.altostrat.com

* Added www01.yinghli.demo.altostrat.com:443:10.0.2.100 to DNS cache
* Hostname www01.yinghli.demo.altostrat.com was found in DNS cache
*   Trying 10.0.2.100:443...
* Connected to www01.yinghli.demo.altostrat.com (10.0.2.100) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*  CAfile: /etc/ssl/certs/ca-certificates.crt
*  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: CN=www01.yinghli.demo.altostrat.com
*  start date: Jun  4 10:36:43 2023 GMT
*  expire date: Sep  2 10:36:42 2023 GMT
*  subjectAltName: host "www01.yinghli.demo.altostrat.com" matched cert's "www01.yinghli.demo.altostrat.com"
*  issuer: C=US; O=Let's Encrypt; CN=R3
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x55865ef982e0)
> GET / HTTP/2
> Host: www01.yinghli.demo.altostrat.com
> user-agent: curl/7.74.0
> accept: */*
> 
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
< HTTP/2 200 
< server: nginx/1.18.0
< date: Mon, 05 Jun 2023 02:29:38 GMT
< content-type: text/html
< content-length: 35
< last-modified: Sun, 04 Jun 2023 09:02:16 GMT
< etag: "647c5318-23"
< accept-ranges: bytes
< via: 1.1 google
< 
Page on www01 in asia-southeast1-b
* Connection #0 to host www01.yinghli.demo.altostrat.com left intact

หมายเหตุ: คุณไม่สามารถเข้าถึงบริการ HTTPS ของ VM 10.0.0.2 ได้โดยตรง เนื่องจากไฟร์วอลล์ในองค์กรอนุญาตให้เข้าถึงได้เฉพาะซับเน็ตพร็อกซี 10.0.3.0/24

9. สร้างซับเน็ต NAT ของ PSC

จาก Cloud Shell

gcloud compute networks subnets create psc-nat-subnet \
--network=vpc-demo-producer \
--region=asia-southeast1 \
--range=10.0.5.0/24 \
--purpose=private-service-connect

10. สร้างการเชื่อมต่อบริการ HTTPS

สร้างการเชื่อมต่อบริการ HTTPS จาก Cloud Shell

gcloud compute service-attachments create ilbserviceattach \
--region=asia-southeast1 \
--producer-forwarding-rule=https-ilb-psc \
--connection-preference=ACCEPT_AUTOMATIC \
--nat-subnets=psc-nat-subnet

ตรวจสอบความถูกต้องของแนบบริการ HTTPs

gcloud compute service-attachments describe ilbserviceattach --region asia-southeast1

บันทึกชื่อไฟล์แนบบริการ

projects/<project>/regions/asia-southeast1/serviceAttachments/ilbserviceattach

11. สร้างเครือข่าย VPC ของผู้ใช้

ในส่วนต่อไปนี้ ระบบจะกำหนดค่า VPC ของผู้ใช้ในโปรเจ็กต์เดียวกัน แต่ก็รองรับโปรเจ็กต์ที่แตกต่างกันด้วย การสื่อสารระหว่างเครือข่ายผู้บริโภคและเครือข่ายผู้ผลิตจะดำเนินการผ่านการเชื่อมต่อบริการที่กำหนดไว้ในเครือข่ายผู้ผลิต

เครือข่าย VPC

จาก Cloud Shell

gcloud compute networks create vpc-demo-consumer --project=$prodproject --subnet-mode=custom

สร้างซับเน็ต

จาก Cloud Shell

gcloud compute networks subnets create consumer-subnet --project=$prodproject  --range=10.0.6.0/24 --network=vpc-demo-consumer --region=asia-southeast1

12. สร้างกลุ่มปลายทางของเครือข่าย PSC

สร้าง PSC NEG

คัดลอกชื่อการแนบบริการ https ก่อนหน้าและวางในพารามิเตอร์ --psc-target-service

จาก Cloud Shell

gcloud beta compute network-endpoint-groups create consumerpscneg \
--project=$prodproject \
--region=asia-southeast1 \
--network-endpoint-type=PRIVATE_SERVICE_CONNECT \
--psc-target-service=projects/<project>/regions/asia-southeast1/serviceAttachments/ilbserviceattach \
--network=vpc-demo-consumer \
--subnet=consumer-subnet

หลังจากตั้งค่า PSC NEG สำเร็จแล้ว จาก UI ให้ทำตาม Private Service Connect -> Published Services -> โปรดทราบว่าการเชื่อมต่อ ilbserviceattach ที่เผยแพร่แล้วจะระบุถึงกฎการส่งต่อ 1 รายการ

320741b7dedc7984.png

13. สร้างตัวจัดสรรภาระงาน HTTPS ภายนอกสำหรับผู้ใช้

สร้างตัวจัดสรรภาระงาน HTTPS ภายนอกและใช้ NEG ของ PSC เป็นบริการแบ็กเอนด์( เอกสารประกอบ)

จาก Cloud Shell

gcloud compute addresses create httpspsclb \
    --ip-version=IPV4 --global

gcloud compute backend-services create consumer-bs \
    --load-balancing-scheme=EXTERNAL_MANAGED \
    --protocol=HTTPS \
    --global

gcloud compute backend-services add-backend consumer-bs \
  --network-endpoint-group=consumerpscneg \
  --network-endpoint-group-region=asia-southeast1 \
  --global

gcloud compute url-maps create consumer-url \
  --default-service=consumer-backend-service \
  --global

gcloud compute ssl-certificates create wwwglobal \
    --certificate=fullchain.pem \
    --private-key=private.pem \
    --global

gcloud compute target-https-proxies create consumer-url-target-proxy \
  --url-map=consumer-url \
  --ssl-certificates=wwwglobal

gcloud compute forwarding-rules create consumer-url-forwarding-rule \
    --load-balancing-scheme=EXTERNAL_MANAGED \
    --network-tier=PREMIUM \
    --address=httpspsclb \
    --target-https-proxy=consumer-url-target-proxy \
    --ports=443 \
    --global

อัปเดตระเบียน DNS สำหรับ www01.yinghli.demo.altostrat.com และชี้ไปยังที่อยู่ IP สาธารณะของตัวจัดสรรภาระงาน HTTPS ภายนอก

gcloud dns --project=$prodproject record-sets update www01.yinghli.demo.altostrat.com. --type="A" --zone="yinghli-demo" --rrdatas="34.102.178.214" --ttl="300"

14. การตรวจสอบความถูกต้อง

เข้าถึง https://www01.yinghli.demo.altostrat.com ด้วย curl จากแล็ปท็อป

curl -v https://www01.yinghli.demo.altostrat.com
*   Trying 34.102.178.214:443...
* Connected to www01.yinghli.demo.altostrat.com (34.102.178.214) port 443 (#0)
* ALPN: offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN: server accepted h2
* Server certificate:
*  subject: CN=www01.yinghli.demo.altostrat.com
*  start date: Jun  4 10:36:43 2023 GMT
*  expire date: Sep  2 10:36:42 2023 GMT
*  subjectAltName: host "www01.yinghli.demo.altostrat.com" matched cert's "www01.yinghli.demo.altostrat.com"
*  issuer: C=US; O=Let's Encrypt; CN=R3
*  SSL certificate verify ok.
* using HTTP/2
* h2h3 [:method: GET]
* h2h3 [:path: /]
* h2h3 [:scheme: https]
* h2h3 [:authority: www01.yinghli.demo.altostrat.com]
* h2h3 [user-agent: curl/8.0.0]
* h2h3 [accept: */*]
* Using Stream ID: 1 (easy handle 0x149019a00)
> GET / HTTP/2
> Host: www01.yinghli.demo.altostrat.com
> user-agent: curl/8.0.0
> accept: */*
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
< HTTP/2 200
< server: nginx/1.18.0
< date: Mon, 05 Jun 2023 02:48:43 GMT
< content-type: text/html
< content-length: 35
< last-modified: Sun, 04 Jun 2023 09:02:16 GMT
< etag: "647c5318-23"
< accept-ranges: bytes
< via: 1.1 google, 1.1 google
< alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
<
Page on www01 in asia-southeast1-b
* Connection #0 to host www01.yinghli.demo.altostrat.com left intact

15. ขั้นตอนการล้างข้อมูล

ขั้นตอนการล้างข้อมูลเครือข่ายโปรดิวเซอร์

หมายเหตุ: ขั้นตอนการล้างข้อมูลจะแสดงเฉพาะการกำหนดค่าที่เกี่ยวข้องกับตัวจัดสรรภาระงานและ PSC โดยไม่รวม VPC และการเชื่อมต่อแบบไฮบริด

ลบคอมโพเนนต์ของ Lab จาก Cloud Shell เดียวในเทอร์มินัล

gcloud compute forwarding-rules delete consumer-url-forwarding-rule --global
gcloud compute target-https-proxies delete consumer-url-target-proxy
gcloud compute ssl-certificates delete wwwglobal --global
gcloud compute url-maps delete consumer-url
gcloud compute backend-services delete consumer-bs --global
gcloud compute addresses delete httpspsclb --global

gcloud beta compute network-endpoint-groups delete consumerpscneg --region=asia-southeast1

gcloud compute service-attachments delete ilbserviceattach --region=asia-southeast1
gcloud compute networks subnets delete psc-nat-subnet --region=asia-southeast1

gcloud compute forwarding-rules delete https-ilb-psc --region=asia-southeast1
gcloud compute addresses delete ilbaddress --region=asia-southeast1
gcloud compute target-https-proxies delete on-premise-httpsproxy --region=asia-southeast1
gcloud compute ssl-certificates delete www01 --region=asia-southeast1
gcloud compute url-maps delete on-premise-url --region=asia-southeast1
gcloud compute backend-services delete on-premise-service-backend --region=asia-southeast1
gcloud compute health-checks delete on-prem-service-hc --region=asia-southeast1

gcloud compute network-endpoint-groups delete on-prem-service-neg --zone=asia-southeast1-b
gcloud compute networks subnets delete proxy-subnet-asia-southeast1 --region=asia-southeast1

16. ยินดีด้วย

ขอแสดงความยินดีที่ทำ Codelab เสร็จสมบูรณ์

สิ่งที่เราได้พูดถึง

  • ตัวจัดสรรภาระงาน HTTPS ภายในที่มี Hybrid NEG และการตรวจสอบประสิทธิภาพการทำงานแบบกระจาย
  • ไฟล์แนบบริการ PSC ที่มีตัวจัดสรรภาระงาน HTTPS ภายใน
  • การตั้งค่ากลุ่มปลายทางเครือข่าย PSC
  • แสดง NEG ของ PSC ด้วยตัวจัดสรรภาระงาน HTTPS ภายนอก