הפעלת רשת GDC

בנוסף למשאבים של אשכול Kubernetes, לממשקי API ולרשת הפודים של Kubernetes שמוגדרת כברירת מחדל, GDC מאפשרת לכם להקצות רשתות נוספות באזור GDC ולחבר אותן לרשתות שלכם. לדוגמה, אם משתמשים בפונקציית מישור משתמשים (UPF), אפשר ליצור רשת גישה רדיו (RAN) ורשת מישור נתונים, שלכל אחת מהן יש רשתות משנה שונות שמתחברות ל-pods של UPF.

מידע נוסף על משאבי Edge Network זמין במאמר בנושא Networking.

EdgeNetwork תוכניות

תוכנית האב הזו מכילה כמה משאבים מותאמים אישית שמטרתם לאפשר למשתמשים להקצות ולהגדיר רשתות נוספות באזור GDC ולקשר אותן לרשתות שלכם. לדוגמה, אפשר ליצור רשת של פעולות, ניהול ותחזוקה (OAM) ורשת של אותות, כשכל אחת מהן כוללת כמה רשתות משנה שונות שמחוברות לממשקי המשנה של פודים של פונקציות רשת. המשאבים הבאים משמשים לתוכנית ה-EdgeNetwork:

  • EdgeNetwork: רשת וירטואלית פרטית באזור GDC. החבילות מנותבות באופן עצמאי בתוך EdgeNetwork.
  • EdgeRouter: משאב לוגי באזור GDC שמגדיר פרמטרים שקשורים ל-BGP עבור EdgeNetwork.
  • EdgeSubnet: דומיין L2, רשת משנה L3 באזור GDC. ‫EdgeSubnet נוצר כ-VLAN עם מזהה VLAN משויך ברשת.
  • EdgeInterconnectAttachment: מגדיר קישור וירטואלי חדש בין נתב אזור GDC לבין אחד מנתבי Provider Edge ‏(PE) שלכם. אתם יכולים להשתמש בקובץ המצורף כדי לחבר EdgeNetworkמשאב לרשת, כמו ניתוב וירטואלי ועיצוב (VRF), ברשת שלכם.

כשיוצרים פריסה, אפשר להתאים אישית תוכנית אב באמצעות הפרמטרים הבאים בקובץ setters.yaml:

פרמטר תיאור
project-id מזהה הפרויקט של פרויקט שמנהל משאבים שקשורים ל-EdgeNetwork. צריך לקשר את Edge למזהה הפרויקט הספציפי הזה.
network-name השם של EdgeNetwork משאב.
location האזור Google Cloud של אזור GDC. לדוגמה, us-west-1.
zone אזור GDC ליצירת EdgeNetwork.
mtu יחידת השידור המקסימלית (MTU) של כתובת ה-IP של EdgeNetwork. האפשרויות התקפות הן בין 1500 ל-9000.
interconnect-attachment-name השם של קובץ המצורף של הקישוריות בין הרשתות.
interconnect-attachment-vlanid מזהה ה-VLAN שתויג בחבילה שהוקצה לצירוף ל-Interconnect.
interconnect-attachment-interface-ipv4cidr כתובת ה-IP של הממשק EdgeRouterשמתחבר למשאב EdgeInterconnectAttachment.
interconnect-attachment-bgppeer-ipv4cidr כתובת ה-IPv4 של הצד השני של עמית האזור GDC בסשן BGP.
subnet-name השם של EdgeSubnet המשאב.
subnet-vlan-id מזהה ה-VLAN שהוקצה למשאב EdgeSubnet.
subnet-ipv4cidr תת-רשת IPv4 של משאב EdgeSubnet. כתובת ה-IP הראשונה ב-Classless Inter-Domain Routing‏ (CIDR) שמורה כשער של רשת המשנה.
subnet-bgppeer-ipv4cidr כתובת ה-IP של BGP בצד העמית. כתובת ה-IP צריכה להיות באותה תת-רשת של משאב EdgeSubnet.

הגדרת הרשת עם שתי רשתות משנה

בקטע הזה מוסבר איך להגדיר רשת עם שתי תת-רשתות. לדוגמה, לרשת ran-network יש שתי רשתות משנה, ranaccess-1 ו-ranaccess-2. בחיבורים צפונה, ran-network מגדיר שני חיבורים בין רשתות לחיבורים בין רשתות cbae0a11-5d97-4bd6-8a09-e5133bb541ca ו-a52e2c74-84f2-4a6d-8cd2-7c5b0fc1c031.

ייבוא של תוכנית EdgeNetwork

  1. בתפריט הניווט, לוחצים על תוכניות.
  2. בתפריט הנפתח, בוחרים את אשכול התיזמור המועדף.
  3. לוחצים על ייבוא מהספרייה.
  4. בוחרים בתוכנית השרטוט GDCE EdgeNetwork setup (הגדרת GDCE EdgeNetwork).
  5. לוחצים על הוספת תוכנית.
  6. בדף הבא, מציינים שם לתוכנית. לדוגמה, הגדרה של GDCE EdgeNetwork.
    1. אפשר גם להוסיף תוויות.
  7. לוחצים על יצירה. התוכנית מופיעה ברשימה Draft Blueprints.

עריכת תוכנית

  1. בתפריט הניווט, לוחצים על תוכניות > תוכנית טיוטה.
  2. בוחרים את התוכנית שרוצים לערוך. ייפתח עורך של תוכנית.
  3. עורכים את המשאבים לפי ההגדרות שלכם.
  4. אחר כך לוחצים על שמירת הקובץ.

הצעת שרטוט

  1. בתפריט הניווט, לוחצים על תוכניות > תוכנית טיוטה. יופיע עורך התוכניות.
  2. לוחצים על הצעה. הסטטוס של התוכנית משתנה למוצע.

אישור תוכנית

  1. בתפריט הניווט, לוחצים על Blueprints > Drafts Blueprint (תוכניות אב > טיוטות של תוכניות אב).
  2. לוחצים על סמל הפעולה לצד שם התוכנית.
  3. לוחצים על אישור. תוכנית האב תופיע בתוכניות אב שאושרו.

אחזור המידע על הקישוריות

כדי לאחזר את פרטי הקישוריות:

  1. מגדירים ומייצאים משתני סביבה:

    export networkName=NETWORK_NAME
    export MACHINES_LOCATION=MACHINE_LOCATION # value where machines or rack is located. Can be different from cluster location.
    export MACHINES_PROJECT_ID=PROJECT_ID # project in which machines or rack is registered. Can be different from cluster project
    export EDGE_ZONE=ZONE # Edge zone in which machines or rack is located
    

    מחליפים את מה שכתוב בשדות הבאים:

    • NETWORK_NAME: שם הרשת.
    • MACHINE_LOCATION: המיקום של המכונה או המתלה. הערך הזה יכול להיות שונה מהמיקום של האשכול.
    • PROJECT_ID: הפרויקט שבו המכונה או המתלה רשומים. הערך הזה יכול להיות שונה מהפרויקט של האשכול.
    • ZONE: אזור ה-Edge שבו נמצאות המכונות או המתלה.
  2. מאחזרים את פרטי הקישוריות:

    gcloud alpha edge-cloud networking interconnects list --zone=$EDGE_ZONE --location=$MACHINES_LOCATION --project=$MACHINES_PROJECT_ID
    

    הפלט אמור להיראות כך: רושמים את השם והיציאות הפיזיות של החיבור בין הרשתות כדי להחיל אותם על חיבור הרשתות.

    NAME UUID
    DEVICECLOUDRESOURCENAME
    PHYSICALPORTS
    cbae0a11-5d97-4bd6-8a09-e5133bb541ca cbae0a11-5d97-4bd6-8a09-e5133bb541ca projects/81907970660/locations/us-central1-edge-den8/switches/et19.den97
    
    HundredGigE0/0/0/0,HundredGigE0/0/0/23
    a52e2c74-84f2-4a6d-8cd2-7c5b0fc1c031 a52e2c74-84f2-4a6d-8cd2-7c5b0fc1c031 projects/81907970660/locations/us-central1-edge-den8/switches/et19.den97 HundredGigE0/0/0/1,HundredGigE0/0/0/22
    37e5da97-1a3f-4935-9d9b-0a8cea589644 37e5da97-1a3f-4935-9d9b-0a8cea589644 projects/81907970660/locations/us-central1-edge-den8/switches/et20.den97 HundredGigE0/0/0/0,HundredGigE0/0/0/23
    71b54ef5-6b12-4b03-b8ce-eb88196f8a93 71b54ef5-6b12-4b03-b8ce-eb88196f8a93 projects/81907970660/locations/us-central1-edge-den8/switches/et20.den97 HundredGigE0/0/0/1,HundredGigE0/0/0/22
    

EdgeNetwork פריסה

יצירת פריסה של EdgeNetwork

  1. בתפריט הניווט, לוחצים על תוכניות אב > תוכניות אב שאושרו.
  2. לוחצים על התוכנית EdgeNetwork שרוצים לפרוס.
  3. לוחצים על יצירת פריסה.
  4. מזינים שם לפריסה.
  5. לוחצים על יצירת פריסה. הפריסה מופיעה בטיוטת פריסה.

עריכה של פריסת EdgeNetwork

  1. בתפריט הניווט, לוחצים על תוכניות.
  2. לוחצים על התוכנית EdgeNetwork שרוצים לערוך. יופיע עורך פריסה.
  3. עורכים את קובץ setters.yaml. פרטים על כל שדה בקובץ זמינים בEdgeNetwork תוכניות. קובץ setters.yaml לדוגמה עם הגדרה מלאה:

    apiVersion: v1
    kind: ConfigMap
    metadata: # kpt-merge: /setters
      name: setters
      annotations:
        config.kubernetes.io/local-config: "true"
        internal.kpt.dev/upstream-identifier:'|ConfigMap|default|setters'
    data:
      # The project managing the GDC Edge machines.
      project-id: tna-testing-01
      # Name of the network
      network-name: ranprod
      # Location in which to create the resources
      location: us-central1
      # Zone to create in the resources
      zone: us-central1-edge-den8
      # Details of subnets for southbound peering
      # Details of subnet 1
      # Name of the subnet
      subnet1-name: ranaccess-prod1
      # vlanId for the subnet
      subnet1-vlanid: 2142
      # ipv4cidr for the subnet
      subnet1-ipv4cidr: 10.142.0.0/24
      # ipv4cidr for the subnet bgppeer
      subnet1-bgppeer-ipv4cidr: 10.142.0.0/24
      # Details of subnets for southbound peering
      # Details of subnet 1
      # Name of the subnet
      subnet2-name: ranaccess-prod2
      # vlanId for the subnet
      subnet2-vlanid: 2132
      # ipv4cidr for the subnet
      subnet2-ipv4cidr: 10.132.0.0/24
      # ipv4cidr for the subnet bgppeer
      subnet2-bgppeer-ipv4cidr: 10.132.0.0/24
      # Interconnect attachments for northbound peering
      # Details of interconnect attachment 1
      # Name of the interconnect
      interconnect1-name: cbae0a11-5d97-4bd6-8a09-e5133bb541ca
      # Name of the interconnect attachment
      interconnect1-attachment-name: prod1-ran
      # valnId of the interconnect attachment
      interconnect1-attachment-vlanid: 2010
      # ip4vcidr for the interconnect attachment interface
      interconnect1-attachment-interface-ipv4cidr:10.65.128.17/31  # ipv4cidr for the interconnect attachment bgppeer
      interconnect1-attachment-bgppeer-ipv4cidr: 10.65.128.16/31
      # Interconnect attachments for northbound peering
      # Details of interconnect attachment 1
      # Name of the interconnect
      interconnect2-name: a52e2c74-84f2-4a6d-8cd2-7c5b0fc1c031
      # Name of the interconnect attachment
      interconnect2-attachment-name: prod2-ran
      # valnId of the interconnect attachment
      interconnect2-attachment-vlanid: 2020
      # ip4vcidr for the interconnect attachment interface
      Interconnect2-attachment-interface-ipv4cidr:10.65.128.13/31 # ipv4cidr for the interconnect attachment bgppeer
      interconnect2-attachment-bgppeer-ipv4cidr: 10.65.128.12/31
    
  4. אחר כך לוחצים על שמירת הקובץ.

החלת פריסת EdgeNetwork

  1. בתפריט הניווט, לוחצים על פריסות.
  2. בוחרים את הפריסה EdgeNetwork שרוצים להחיל.
  3. לוחצים על פריסה.
  4. מאשרים את הפריסה. הפריסה תופיע בקטע Applied Deployment (פריסה שהוחלה).

אימות של תוכנית EdgeNetwork

כדי לאמת את סטטוס היצירה של משאבי EdgeNetwork:

kubectl

  1. יוצרים kube-credentials בשביל אשכול Orchestration כדי להשתמש ב-kubectlCLI:

    gcloud anthos config controller get-credentials ORCHESTRATION_CLUSTER_NAME
    

    מחליפים את ORCHESTRATION_CLUSTER_NAME בשם של אשכול Orchestration.

  2. ממתינים 30 עד 40 דקות עד שהמשאבים יעברו עיבוד.

  3. צופים בסטטוס של המשאבים:

    kubectl describe EdgeNetwork ${networkName} --namespace=tna-config-control
    

    הפלט אמור להיראות כך: שימו לב לmessage ולreason בstatus.conditions.

    Name: ranprod
    Namespace: tna-config-control
    ....
    API Version: config.cloud.google.com/v1alpha1
    Kind: EdgeNetwork
    ....
    Spec:
      Mtu: 9000
      Network Location: us-central1
      Network Zone: us-central1-edge-den8
    Status:
      Conditions:
        Last Transition Time: 2023-03-23T10:08:40Z
        Message: The resource is up to date
        Reason: UpToDate
        Status: True
        Type: Ready
      Create Time: 2023-03-23T10:08:36.582479587Z
      Self Link:
      //gkehub.googleapis.com/v1/projects/tna-testing-01/locations/us-central1/zone s/us-central1-edge-den8/networks/ranprod
      Update Time: 2023-03-23T10:08:40.010036655Z
    Events: <none>
    
  4. מקבלים מידע על נתב Edge שנוצר:

    kubectl describe EdgeRouter router-${networkName} --namespace=tna-config-control
    

    הפלט אמור להיראות כך:

    Name: router-ranprod
    Namespace: tna-config-control
    ...
    API Version: config.cloud.google.com/v1alpha1
    Kind: EdgeRouter
    ....
    Spec:
    .....
      Network:
        External: projects/tna-testing-01/locations/us-central1/zones/us-central1-edge-den8/net works/ranprod
        Object Ref:
          API Group:
          Kind:
          Name:
          Namespace:
      Router Location: us-central1
      Router Zone: us-central1-edge-den8
    Status:
      Bgp Peer:
        Interface: inf-ranaccess-prod1
        Name: 2142-bgp0
        Peer Asn: 3300
        peerIpv4Cidr: 10.142.0.0/24
        Interface: inf-ranaccess-prod2
        Name: 2132-bgp0
        Peer Asn: 3300
        peerIpv4Cidr: 10.132.0.0/24
        Interface: vlan-2010-prod1-ran
        interfaceIpv4Cidr: 10.65.128.17/31
        Name: vlan-2010-bgp0
        Peer Asn: 577
        peerIpv4Cidr: 10.65.128.16/31
        Interface: vlan-2020-prod2-ran
        interfaceIpv4Cidr: 10.65.128.13/31
        Name: vlan-2020-bgp1
        Peer Asn: 577
        peerIpv4Cidr: 10.65.128.12/31
      Conditions:
        Last Transition Time: 2023-03-23T10:47:12Z
        Message: The resource is up to date
        Reason: UpToDate
        Status: True
        Type: Ready
      Create Time: 2023-03-23T10:08:38.995964419Z
      Interface:
        Name: inf-ranaccess-prod1
        Subnetwork:
          API Group: config.cloud.google.com
          Kind: EdgeSubnet
          Name: ranaccess-prod1
          Namespace: tna-config-control
        Name: inf-ranaccess-prod2
        Subnetwork:
          API Group: config.cloud.google.com
          Kind: EdgeSubnet
          Name: ranaccess-prod2
          Namespace: tna-config-control
        ipv4Cidr: 10.65.128.17/31
        Linked Interconnect Attachment:
          API Group: config.cloud.google.com
          Kind: EdgeInterconnectAttachment
          Name: prod1-ran
          Namespace: tna-config-control
        Name: vlan-2010-prod1-ran
        ipv4Cidr: 10.65.128.13/31
        Linked Interconnect Attachment:
          API Group: config.cloud.google.com
          Kind: EdgeInterconnectAttachment
          Name: prod2-ran
          Namespace: tna-config-control
        Name: vlan-2020-prod2-ran
      Self Link: //gkehub.googleapis.com/v1/projects/tna-testing-01/locations/us-central1/zone s/us-central1-edge-den8/routers/router-ranprod
      State: STATE_RUNNING
      Update Time: 2023-03-23T10:36:58.126306756Z
    Events: <none>
    

gcloud

  • מקבלים מידע על נתב Edge שנוצר:

    gcloud edge-cloud networking routers describe router-${networkName} \ --zone=$EDGE_ZONE \
    --location=$LOCATION \
    --project=GDCE_MACHINES_PROJECT
    

    מחליפים את GDCE_MACHINES_PROJECT במזהה הפרויקט שבו רשומים מכשירי ה-GDC.

    כדי להגדיר רשתות עבור User Plane Function (UPF), חוזרים על השלב הזה לכל רשת.

מחיקת פריסה של EdgeNetwork

  1. בתפריט הניווט, לוחצים על פריסות > פריסות שהוחלו.
  2. בוחרים את התוכנית EdgeNetwork שרוצים למחוק.
  3. לוחצים על Delete.
  4. מאשרים את המחיקה.
  5. ממתינים 30 עד 45 דקות עד שהמחיקה תתבצע.
  6. כדי לוודא שמחקתם את המשאבים, חוזרים על השלבים שבקטע עריכת פריסה של EdgeNetwork.