במסמך הזה מפורטות דוגמאות ל-YAML של ההגדרות הנפוצות ביותר של אשכולות Google Distributed Cloud. קבצי ההגדרות לדוגמה של האשכול מספקים פרמוטציות של התכונות והיכולות הבאות:
- פרופיל Edge
- זמינות גבוהה
- Open ID Connect (OIDC)
- Lightweight Directory Access Protocol (LDAP)
- אפשרויות של מאזן עומסים:
- Multiple NodePools
- שינויים במפתחות SSH
- Registry mirror
- מאחורי שרת proxy
- מאגר חבילות פרטי
איך משתמשים בדוגמאות
אוסף דוגמאות ה-YAML הזה מיועד בעיקר כחומר לימודי שממחיש איך תכונות שונות נראות כשהן מוגדרות בצורה נכונה.
אם רוצים להשתמש בדוגמאות האלה כדי ליצור אשכולות משלכם, צריך לבצע שינויים. הרבה מהערכים שבהם נעשה שימוש, כמו הערכים של storage
הקטע, הם ערכי ברירת מחדל ומתאימים לרוב האשכולות. עם זאת, ערכים אחרים, כמו spec.authentication.oidc.clientID ו-spec.gkeConnect.projectID, הם ספציפיים לפרויקט ולסביבה שלכם.
לפני שמנסים להשתמש בתוכן YAML שמופיע במסמך הזה, מומלץ לקרוא את התיעוד של התכונה הרלוונטית.
תכונות בכל דוגמה
בטבלה הבאה מפורטים פרטי ההגדרה הבסיסיים של כל דוגמה:
| דוגמאות | |
|---|---|
| אשכולות עצמאיים | |
| פרופיל Edge בסיסי |
|
| פרופיל קצה עם זמינות גבוהה |
|
| אשכולות היברידיים | |
| אשכול היברידי בסיסי |
|
| אשכול היברידי עם זמינות גבוהה |
|
| קלאסטר היברידי עם זמינות גבוהה ואיזון עומסים מחוץ למישור הבקרה |
|
| קלאסטרים של אדמינים | |
| אשכול אדמין בסיסי |
|
| קלאסטר אדמין עם איזון עומסים ידני |
|
| קלאסטר אדמין עם זמינות גבוהה |
|
| אשכולות משתמשים | |
| אשכול משתמשים בסיסי |
|
| אשכול משתמשים עם זמינות גבוהה עם כמה מאגרי צמתים |
|
| אשכול משתמשים עם זמינות גבוהה באמצעות OIDC |
|
| קלאסטר משתמשים בזמינות גבוהה עם LDAP ואיזון עומסים של BGP |
|
אשכולות עצמאיים
שימו לב ליכולות הבאות של אשכול עצמאי:
- הוא יכול לנהל את עצמו
- הוא יכול להריץ עומסי עבודה
- הוא לא יכול ליצור או לנהל אשכולות אחרים או אשכולות משתמשים
אשכולים עצמאיים מתאימים להתקנות של אשכולות שדורשות שטח קטן או במצבים שבהם רוצים להריץ אשכולות במחיצות מבודדות ברשת.
מידע נוסף על אשכולות עצמאיים זמין במאמרים בנושא פריסת אשכול עצמאי ויצירת אשכולות עצמאיים.
פרופיל בסיסי של קצה
שימו לב לתכונות ולאפשרויות הבאות בהגדרת אשכול עצמאי:
- צומת יחיד
- פרופיל Edge
- אין מאגרי צמתים
gcrKeyPath: baremetal/gcr.json
sshPrivateKeyPath: .ssh/id_rsa
gkeConnectAgentServiceAccountKeyPath: baremetal/connect-agent.json
gkeConnectRegisterServiceAccountKeyPath: baremetal/connect-register.json
cloudOperationsServiceAccountKeyPath: baremetal/cloud-ops.json
---
apiVersion: v1
kind: Namespace
metadata:
name: cluster-edge-basic
---
apiVersion: baremetal.cluster.gke.io/v1
kind: Cluster
metadata:
name: edge-basic
namespace: cluster-edge-basic
spec:
type: standalone
profile: edge
anthosBareMetalVersion: 1.34.100-gke.93
gkeConnect:
projectID: project-fleet
controlPlane:
nodePoolSpec:
nodes:
- address: 10.200.0.2
clusterNetwork:
pods:
cidrBlocks:
- 192.168.0.0/16
services:
cidrBlocks:
- 10.96.0.0/20
loadBalancer:
mode: bundled
ports:
controlPlaneLBPort: 443
vips:
controlPlaneVIP: 10.200.0.71
ingressVIP: 10.200.0.72
addressPools:
- name: pool1
addresses:
- 10.200.0.72-10.200.0.90
clusterOperations:
projectID: project-fleet
location: us-central1
storage:
lvpNodeMounts:
path: /mnt/localpv-disk
storageClassName: local-disks
lvpShare:
path: /mnt/localpv-share
storageClassName: local-shared
numPVUnderSharedPath: 5
nodeConfig:
podDensity:
maxPodsPerNode: 110
פרופיל קצה עם זמינות גבוהה
שימו לב לתכונות ולאפשרויות הבאות בהגדרת אשכול עצמאי:
- זמינות גבוהה עם שלושה צמתים
- פרופיל Edge
- איזון עומסים בשכבה 2
- אין מאגרי צמתים
gcrKeyPath: baremetal/gcr.json
sshPrivateKeyPath: .ssh/id_rsa
gkeConnectAgentServiceAccountKeyPath: baremetal/connect-agent.json
gkeConnectRegisterServiceAccountKeyPath: baremetal/connect-register.json
cloudOperationsServiceAccountKeyPath: baremetal/cloud-ops.json
---
apiVersion: v1
kind: Namespace
metadata:
name: cluster-edge-ha
---
apiVersion: baremetal.cluster.gke.io/v1
kind: Cluster
metadata:
name: edge-ha
namespace: cluster-edge-ha
spec:
type: standalone
profile: edge
anthosBareMetalVersion: 1.34.100-gke.93
gkeConnect:
projectID: project-fleet
controlPlane:
nodePoolSpec:
nodes:
- address: 10.200.0.2
- address: 10.200.0.3
- address: 10.200.0.4
clusterNetwork:
pods:
cidrBlocks:
- 192.168.0.0/16
services:
cidrBlocks:
- 10.96.0.0/20
loadBalancer:
mode: bundled
ports:
controlPlaneLBPort: 443
vips:
controlPlaneVIP: 10.200.0.71
ingressVIP: 10.200.0.72
addressPools:
- name: pool1
addresses:
- 10.200.0.72-10.200.0.90
clusterOperations:
projectID: project-fleet
location: us-central1
storage:
lvpNodeMounts:
path: /mnt/localpv-disk
storageClassName: local-disks
lvpShare:
path: /mnt/localpv-share
storageClassName: local-shared
numPVUnderSharedPath: 5
nodeConfig:
podDensity:
maxPodsPerNode: 110
אשכולות היברידיים
שימו לב ליכולות הבאות של אשכול היברידי:
- הוא יכול לנהל את עצמו
- הוא יכול להריץ עומסי עבודה
- הוא יכול לנהל אשכולות משתמשים אחרים
אשכולות היברידיים פועלים כמו אשכולות אדמין שיכולים להריץ עומסי עבודה של משתמשים. בדומה לאשכולות אדמין, אשכולות היברידיים יכולים לנהל אשכולות משתמשים אחרים. מידע נוסף על אשכולות עצמאיים זמין במאמרים בנושא פריסת אשכולות היברידיים ויצירת אשכולות היברידיים.
אשכול היברידי בסיסי
שימו לב לתכונות ולאפשרויות הבאות בהגדרת האשכול ההיברידי הזה:
- זמינות לא גבוהה
- איזון עומסים בשכבה 2
gcrKeyPath: baremetal/gcr.json
sshPrivateKeyPath: .ssh/id_rsa
gkeConnectAgentServiceAccountKeyPath: baremetal/connect-agent.json
gkeConnectRegisterServiceAccountKeyPath: baremetal/connect-register.json
cloudOperationsServiceAccountKeyPath: baremetal/cloud-ops.json
---
apiVersion: v1
kind: Namespace
metadata:
name: cluster-hybrid-basic
---
apiVersion: baremetal.cluster.gke.io/v1
kind: Cluster
metadata:
name: hybrid-basic
namespace: cluster-hybrid-basic
spec:
type: hybrid
profile: default
anthosBareMetalVersion: 1.34.100-gke.93
gkeConnect:
projectID: project-fleet
controlPlane:
nodePoolSpec:
nodes:
- address: 10.200.0.2
clusterNetwork:
pods:
cidrBlocks:
- 192.168.0.0/16
services:
cidrBlocks:
- 10.96.0.0/20
loadBalancer:
mode: bundled
ports:
controlPlaneLBPort: 443
vips:
controlPlaneVIP: 10.200.0.71
ingressVIP: 10.200.0.72
addressPools:
- name: pool1
addresses:
- 10.200.0.72-10.200.0.90
clusterOperations:
projectID: project-fleet
location: us-central1
storage:
lvpNodeMounts:
path: /mnt/localpv-disk
storageClassName: local-disks
lvpShare:
path: /mnt/localpv-share
storageClassName: local-shared
numPVUnderSharedPath: 5
nodeConfig:
podDensity:
maxPodsPerNode: 250
---
apiVersion: baremetal.cluster.gke.io/v1
kind: NodePool
metadata:
name: np1
namespace: cluster-hybrid-basic
spec:
clusterName: hybrid-basic
nodes:
- address: 10.200.0.10
- address: 10.200.0.11
- address: 10.200.0.12
קלאסטר היברידי עם זמינות גבוהה
שימו לב לתכונות ולאפשרויות הבאות בהגדרת האשכול ההיברידי הזה:
- זמינות גבוהה
- OIDC
- מאחורי שרת proxy
- שיקוף של הרישום
- מאגר חבילות פרטי
- איזון עומסים בשכבה 2
registryMirrors:
- endpoint: https://10.194.2.13:5007/v2/test-namespace
caCertPath: /root/cert.pem
pullCredentialConfigPath: /root/dockerconfig.json
sshPrivateKeyPath: .ssh/id_rsa
gkeConnectAgentServiceAccountKeyPath: baremetal/connect-agent.json
gkeConnectRegisterServiceAccountKeyPath: baremetal/connect-register.json
cloudOperationsServiceAccountKeyPath: baremetal/cloud-ops.json
---
apiVersion: v1
kind: Namespace
metadata:
name: cluster-hybrid-ha
---
apiVersion: baremetal.cluster.gke.io/v1
kind: Cluster
metadata:
name: hybrid-ha
namespace: cluster-hybrid-ha
spec:
type: hybrid
profile: default
anthosBareMetalVersion: 1.34.100-gke.93
gkeConnect:
projectID: project-fleet
controlPlane:
nodePoolSpec:
nodes:
- address: 10.200.0.2
- address: 10.200.0.3
- address: 10.200.0.4
clusterNetwork:
pods:
cidrBlocks:
- 192.168.0.0/16
services:
cidrBlocks:
- 10.96.0.0/20
proxy:
url: http://10.194.2.140:3128
noProxy:
- 127.0.0.1
- localhost
osEnvironmentConfig:
addPackageRepo: false
loadBalancer:
mode: bundled
ports:
controlPlaneLBPort: 443
vips:
controlPlaneVIP: 10.200.0.71
ingressVIP: 10.200.0.72
addressPools:
- name: pool1
addresses:
- 10.200.0.72-10.200.0.90
clusterOperations:
projectID: project-fleet
location: us-central1
storage:
lvpNodeMounts:
path: /mnt/localpv-disk
storageClassName: local-disks
lvpShare:
path: /mnt/localpv-share
storageClassName: local-shared
numPVUnderSharedPath: 5
authentication:
oidc:
issuerURL: "https://infra.example.dev/adfs"
clientID: "be654652-2c45-49ff-9d7c-3663cee9ba51"
clientSecret: "clientSecret"
kubectlRedirectURL: "http://localhost:44320/callback"
username: "unique_name"
usernamePrefix: "oidc:"
group: "groups"
groupPrefix: "oidc:"
scopes: "allatclaims"
extraParams: "resource=token-groups-claim"
deployCloudConsoleProxy: true
certificateAuthorityData: base64EncodedCACertificate
proxy: http://10.194.2.140:3128
nodeConfig:
podDensity:
maxPodsPerNode: 250
---
apiVersion: baremetal.cluster.gke.io/v1
kind: NodePool
metadata:
name: np1
namespace: cluster-hybrid-ha
spec:
clusterName: hybrid-ha
nodes:
- address: 10.200.0.10
- address: 10.200.0.11
- address: 10.200.0.12
קלאסטר היברידי עם זמינות גבוהה ואיזון עומסים מחוץ למישור הבקרה
שימו לב לתכונות ולאפשרויות הבאות בהגדרת האשכול ההיברידי הזה:
- זמינות גבוהה
- OIDC
- מאחורי שרת proxy
- שיקוף של הרישום
- מאגר חבילות פרטי
- איזון עומסים בשכבה 2 מחוץ למישור הבקרה
registryMirrors:
- endpoint: https://10.194.2.13:5007/v2/test-namespace
caCertPath: /root/cert.pem
pullCredentialConfigPath: /root/dockerconfig.json
sshPrivateKeyPath: .ssh/id_rsa
gkeConnectAgentServiceAccountKeyPath: baremetal/connect-agent.json
gkeConnectRegisterServiceAccountKeyPath: baremetal/connect-register.json
cloudOperationsServiceAccountKeyPath: baremetal/cloud-ops.json
---
apiVersion: v1
kind: Namespace
metadata:
name: cluster-hybrid-ha-lb
---
apiVersion: baremetal.cluster.gke.io/v1
kind: Cluster
metadata:
name: hybrid-ha-lb
namespace: cluster-hybrid-ha-lb
spec:
type: hybrid
profile: default
anthosBareMetalVersion: 1.34.100-gke.93
gkeConnect:
projectID: project-fleet
controlPlane:
nodePoolSpec:
nodes:
- address: 10.200.0.2
- address: 10.200.0.3
- address: 10.200.0.4
clusterNetwork:
pods:
cidrBlocks:
- 192.168.0.0/16
services:
cidrBlocks:
- 10.96.0.0/20
proxy:
url: http://10.194.2.140:3128
noProxy:
- 127.0.0.1
- localhost
osEnvironmentConfig:
addPackageRepo: false
loadBalancer:
mode: bundled
ports:
controlPlaneLBPort: 443
vips:
controlPlaneVIP: 10.200.0.71
ingressVIP: 10.200.0.72
addressPools:
- name: pool1
addresses:
- 10.200.0.72-10.200.0.90
nodePoolSpec:
nodes:
- address: 10.200.0.5
- address: 10.200.0.6
- address: 10.200.0.7
clusterOperations:
projectID: project-fleet
location: us-central1
storage:
lvpNodeMounts:
path: /mnt/localpv-disk
storageClassName: local-disks
lvpShare:
path: /mnt/localpv-share
storageClassName: local-shared
numPVUnderSharedPath: 5
authentication:
oidc:
issuerURL: "https://infra.example.dev/adfs"
clientID: "be654652-2c45-49ff-9d7c-3663cee9ba51"
clientSecret: "clientSecret"
kubectlRedirectURL: "http://localhost:44320/callback"
username: "unique_name"
usernamePrefix: "oidc:"
group: "groups"
groupPrefix: "oidc:"
scopes: "allatclaims"
extraParams: "resource=token-groups-claim"
deployCloudConsoleProxy: true
certificateAuthorityData: base64EncodedCACertificate
proxy: http://10.194.2.140:3128
nodeConfig:
podDensity:
maxPodsPerNode: 250
---
apiVersion: baremetal.cluster.gke.io/v1
kind: NodePool
metadata:
name: np1
namespace: cluster-hybrid-ha-lb
spec:
clusterName: hybrid-ha-lb
nodes:
- address: 10.200.0.10
- address: 10.200.0.11
- address: 10.200.0.12
קלאסטרים של אדמינים
אשכול אדמין משמש לניהול אשכולות משתמשים אחרים. משתמשים באשכולות אדמין אם יש לכם קבוצה של אשכולות באותו מרכז נתונים שאתם רוצים לנהל ממקום מרכזי, וגם לפריסות גדולות שצריכות בידוד בין צוותים שונים או בין עומסי עבודה של פיתוח וייצור.
מידע נוסף על אשכולות אדמין זמין במאמרים בנושא פריסה של כמה אשכולות ויצירה של אשכולות אדמין.
אשכול אדמין בסיסי
שימו לב לתכונות ולאפשרויות הבאות בהגדרת אשכול האדמין:
- זמינות לא גבוהה
- איזון עומסים בשכבה 2
gcrKeyPath: baremetal/gcr.json
sshPrivateKeyPath: .ssh/id_rsa
gkeConnectAgentServiceAccountKeyPath: baremetal/connect-agent.json
gkeConnectRegisterServiceAccountKeyPath: baremetal/connect-register.json
cloudOperationsServiceAccountKeyPath: baremetal/cloud-ops.json
---
apiVersion: v1
kind: Namespace
metadata:
name: cluster-admin-basic
---
apiVersion: baremetal.cluster.gke.io/v1
kind: Cluster
metadata:
name: admin-basic
namespace: cluster-admin-basic
spec:
type: admin
profile: default
anthosBareMetalVersion: 1.34.100-gke.93
gkeConnect:
projectID: project-fleet
controlPlane:
nodePoolSpec:
nodes:
- address: 10.200.0.2
clusterNetwork:
pods:
cidrBlocks:
- 192.168.0.0/16
services:
cidrBlocks:
- 10.96.0.0/20
loadBalancer:
mode: bundled
ports:
controlPlaneLBPort: 443
vips:
controlPlaneVIP: 10.200.0.71
clusterOperations:
projectID: project-fleet
location: us-central1
storage:
lvpNodeMounts:
path: /mnt/localpv-disk
storageClassName: local-disks
lvpShare:
path: /mnt/localpv-share
storageClassName: local-shared
numPVUnderSharedPath: 5
nodeConfig:
podDensity:
maxPodsPerNode: 250
קלאסטר אדמין עם איזון עומסים ידני
שימו לב לתכונות ולאפשרויות הבאות בהגדרת אשכול האדמין:
- זמינות לא גבוהה
- איזון עומסים חיצוני שהוגדר ידנית
gcrKeyPath: baremetal/gcr.json
sshPrivateKeyPath: .ssh/id_rsa
gkeConnectAgentServiceAccountKeyPath: baremetal/connect-agent.json
gkeConnectRegisterServiceAccountKeyPath: baremetal/connect-register.json
cloudOperationsServiceAccountKeyPath: baremetal/cloud-ops.json
---
apiVersion: v1
kind: Namespace
metadata:
name: cluster-admin-manlb
---
apiVersion: baremetal.cluster.gke.io/v1
kind: Cluster
metadata:
name: admin-manlb
namespace: cluster-admin-manlb
spec:
type: admin
profile: default
anthosBareMetalVersion: 1.34.100-gke.93
gkeConnect:
projectID: project-fleet
controlPlane:
nodePoolSpec:
nodes:
- address: 10.200.0.2
clusterNetwork:
pods:
cidrBlocks:
- 192.168.0.0/16
services:
cidrBlocks:
- 10.96.0.0/20
loadBalancer:
mode: manual
ports:
controlPlaneLBPort: 443
vips:
controlPlaneVIP: 10.200.0.71
clusterOperations:
projectID: project-fleet
location: us-central1
storage:
lvpNodeMounts:
path: /mnt/localpv-disk
storageClassName: local-disks
lvpShare:
path: /mnt/localpv-share
storageClassName: local-shared
numPVUnderSharedPath: 5
nodeConfig:
podDensity:
maxPodsPerNode: 250
קלאסטר אדמין עם זמינות גבוהה
שימו לב לתכונות ולאפשרויות הבאות בהגדרת אשכול האדמין:
- זמינות גבוהה
- OIDC
- מאחורי שרת proxy
- שיקוף של הרישום
- מאגר חבילות פרטי
- איזון עומסים בשכבה 2
registryMirrors:
- endpoint: https://10.194.2.13:5007/v2/test-namespace
caCertPath: /root/cert.pem
pullCredentialConfigPath: /root/dockerconfig.json
sshPrivateKeyPath: .ssh/id_rsa
gkeConnectAgentServiceAccountKeyPath: baremetal/connect-agent.json
gkeConnectRegisterServiceAccountKeyPath: baremetal/connect-register.json
cloudOperationsServiceAccountKeyPath: baremetal/cloud-ops.json
---
apiVersion: v1
kind: Namespace
metadata:
name: cluster-admin-ha
---
apiVersion: baremetal.cluster.gke.io/v1
kind: Cluster
metadata:
name: admin-ha
namespace: cluster-admin-ha
spec:
type: admin
profile: default
anthosBareMetalVersion: 1.34.100-gke.93
gkeConnect:
projectID: project-fleet
controlPlane:
nodePoolSpec:
nodes:
- address: 10.200.0.2
- address: 10.200.0.3
- address: 10.200.0.4
clusterNetwork:
pods:
cidrBlocks:
- 192.168.0.0/16
services:
cidrBlocks:
- 10.96.0.0/20
proxy:
url: http://10.194.2.140:3128
noProxy:
- 127.0.0.1
- localhost
osEnvironmentConfig:
addPackageRepo: false
loadBalancer:
mode: bundled
ports:
controlPlaneLBPort: 443
vips:
controlPlaneVIP: 10.200.0.71
clusterOperations:
projectID: project-fleet
location: us-central1
storage:
lvpNodeMounts:
path: /mnt/localpv-disk
storageClassName: local-disks
lvpShare:
path: /mnt/localpv-share
storageClassName: local-shared
numPVUnderSharedPath: 5
authentication:
oidc:
issuerURL: "https://infra.example.dev/adfs"
clientID: "be654652-2c45-49ff-9d7c-3663cee9ba51"
clientSecret: "clientSecret"
kubectlRedirectURL: "http://localhost:44320/callback"
username: "unique_name"
usernamePrefix: "oidc:"
group: "groups"
groupPrefix: "oidc:"
scopes: "allatclaims"
extraParams: "resource=token-groups-claim"
deployCloudConsoleProxy: true
certificateAuthorityData: base64EncodedCACertificate
proxy: http://10.194.2.140:3128
nodeConfig:
podDensity:
maxPodsPerNode: 250
אשכולות משתמשים
אשכול משתמשים מריץ את עומסי העבודה שלכם בקונטיינרים. אשכולות משתמשים צריכים להכיל צומת עובד אחד או יותר שמריצים עומסי עבודה של משתמשים. כדאי להשתמש באשכולות משתמשים אם יש לכם קבוצה של אשכולות באותו מרכז נתונים שאתם רוצים לנהל ממקום מרכזי. מומלץ להשתמש באשכולות משתמשים גם בפריסות גדולות יותר שבהן נדרשת הפרדה בין צוותים שונים או בין עומסי עבודה של פיתוח וייצור.
מידע נוסף על אשכולות אדמין זמין במאמרים בנושא פריסה של כמה אשכולות ויצירת אשכולות משתמשים.
אשכול משתמש בסיסי
שימו לב לתכונות ולאפשרויות הבאות בתצורת אשכול המשתמשים הזה:
- זמינות לא גבוהה
- איזון עומסים בשכבה 2
apiVersion: v1
kind: Namespace
metadata:
name: cluster-user-basic
---
apiVersion: baremetal.cluster.gke.io/v1
kind: Cluster
metadata:
name: user-basic
namespace: cluster-user-basic
spec:
type: user
profile: default
anthosBareMetalVersion: 1.34.100-gke.93
gkeConnect:
projectID: project-fleet
controlPlane:
nodePoolSpec:
nodes:
- address: 10.200.0.20
clusterNetwork:
pods:
cidrBlocks:
- 192.168.0.0/16
services:
cidrBlocks:
- 10.96.0.0/20
loadBalancer:
mode: bundled
ports:
controlPlaneLBPort: 443
vips:
controlPlaneVIP: 10.200.0.91
ingressVIP: 10.200.0.92
addressPools:
- name: pool1
addresses:
- 10.200.0.92-10.200.0.100
clusterOperations:
projectID: project-fleet
location: us-central1
storage:
lvpNodeMounts:
path: /mnt/localpv-disk
storageClassName: local-disks
lvpShare:
path: /mnt/localpv-share
storageClassName: local-shared
numPVUnderSharedPath: 5
nodeConfig:
podDensity:
maxPodsPerNode: 250
---
apiVersion: baremetal.cluster.gke.io/v1
kind: NodePool
metadata:
name: np1
namespace: cluster-user-basic
spec:
clusterName: user-basic
nodes:
- address: 10.200.0.30
- address: 10.200.0.31
- address: 10.200.0.32
אשכול משתמשים עם זמינות גבוהה וכמה מאגרי צמתים
שימו לב לתכונות ולאפשרויות הבאות בתצורת אשכול המשתמשים הזה:
- שינויים במפתחות SSH
- זמינות גבוהה
- מאחורי שרת proxy
- שיקוף של הרישום
- מאגר חבילות פרטי
- איזון עומסים בשכבה 2
- כמה מאגרי צמתים
registryMirrors:
- endpoint: https://10.194.2.13:5007/v2/test-namespace
caCertPath: /root/cert.pem
pullCredentialConfigPath: /root/dockerconfig.json
---
apiVersion: v1
kind: Namespace
metadata:
name: cluster-user-ha-np
---
apiVersion: baremetal.cluster.gke.io/v1
kind: Cluster
metadata:
name: user-ha-np
namespace: cluster-user-ha-np
spec:
type: user
profile: default
anthosBareMetalVersion: 1.34.100-gke.93
gkeConnect:
projectID: project-fleet
controlPlane:
nodePoolSpec:
nodes:
- address: 10.200.0.20
- address: 10.200.0.21
- address: 10.200.0.22
clusterNetwork:
pods:
cidrBlocks:
- 192.168.0.0/16
services:
cidrBlocks:
- 10.96.0.0/20
proxy:
url: http://10.194.2.140:3128
noProxy:
- 127.0.0.1
- localhost
osEnvironmentConfig:
addPackageRepo: false
loadBalancer:
mode: bundled
ports:
controlPlaneLBPort: 443
vips:
controlPlaneVIP: 10.200.0.91
ingressVIP: 10.200.0.92
addressPools:
- name: pool1
addresses:
- 10.200.0.92-10.200.0.100
clusterOperations:
projectID: project-fleet
location: us-central1
storage:
lvpNodeMounts:
path: /mnt/localpv-disk
storageClassName: local-disks
lvpShare:
path: /mnt/localpv-share
storageClassName: local-shared
numPVUnderSharedPath: 5
nodeConfig:
podDensity:
maxPodsPerNode: 250
credential:
sshKeySecret:
name: ssh-key
namespace: cluster-user-ha-np
---
apiVersion: baremetal.cluster.gke.io/v1
kind: NodePool
metadata:
name: np1
namespace: cluster-user-ha-np
spec:
clusterName: user-ha-np
nodes:
- address: 10.200.0.30
- address: 10.200.0.31
- address: 10.200.0.32
---
apiVersion: baremetal.cluster.gke.io/v1
kind: NodePool
metadata:
name: np2
namespace: cluster-user-ha-np
spec:
clusterName: user-ha-np
nodes:
- address: 10.200.0.33
- address: 10.200.0.34
- address: 10.200.0.35
אשכול משתמשים עם זמינות גבוהה ו-OIDC
שימו לב לתכונות ולאפשרויות הבאות בתצורת אשכול המשתמשים הזה:
- זמינות גבוהה
- OIDC
- מאחורי שרת proxy
- שיקוף של הרישום
- מאגר חבילות פרטי
- איזון עומסים בשכבה 2 שמוגדר מחוץ למישור הבקרה
registryMirrors:
- endpoint: https://10.194.2.13:5007/v2/test-namespace
caCertPath: /root/cert.pem
pullCredentialConfigPath: /root/dockerconfig.json
---
apiVersion: v1
kind: Namespace
metadata:
name: cluster-user-ha-oidc
---
apiVersion: baremetal.cluster.gke.io/v1
kind: Cluster
metadata:
name: user-ha-oidc
namespace: cluster-user-ha-oidc
spec:
type: user
profile: default
anthosBareMetalVersion: 1.34.100-gke.93
gkeConnect:
projectID: project-fleet
controlPlane:
nodePoolSpec:
nodes:
- address: 10.200.0.20
- address: 10.200.0.21
- address: 10.200.0.22
clusterNetwork:
pods:
cidrBlocks:
- 192.168.0.0/16
services:
cidrBlocks:
- 10.96.0.0/20
proxy:
url: http://10.194.2.140:3128
noProxy:
- 127.0.0.1
- localhost
osEnvironmentConfig:
addPackageRepo: false
loadBalancer:
mode: bundled
ports:
controlPlaneLBPort: 443
vips:
controlPlaneVIP: 10.200.0.91
ingressVIP: 10.200.0.92
addressPools:
- name: pool1
addresses:
- 10.200.0.92-10.200.0.100
nodePoolSpec:
nodes:
- address: 10.200.0.25
- address: 10.200.0.26
- address: 10.200.0.27
clusterOperations:
projectID: project-fleet
location: us-central1
storage:
lvpNodeMounts:
path: /mnt/localpv-disk
storageClassName: local-disks
lvpShare:
path: /mnt/localpv-share
storageClassName: local-shared
numPVUnderSharedPath: 5
authentication:
oidc:
issuerURL: "https://infra.example.dev/adfs"
clientID: "be654652-2c45-49ff-9d7c-3663cee9ba51"
clientSecret: "clientSecret"
kubectlRedirectURL: "http://localhost:44320/callback"
username: "unique_name"
usernamePrefix: "oidc:"
group: "groups"
groupPrefix: "oidc:"
scopes: "allatclaims"
extraParams: "resource=token-groups-claim"
deployCloudConsoleProxy: true
certificateAuthorityData: base64EncodedCACertificate
proxy: http://10.194.2.140:3128
nodeConfig:
podDensity:
maxPodsPerNode: 250
---
apiVersion: baremetal.cluster.gke.io/v1
kind: NodePool
metadata:
name: np1
namespace: cluster-user-ha-oidc
spec:
clusterName: user-ha-oidc
nodes:
- address: 10.200.0.30
- address: 10.200.0.31
- address: 10.200.0.32
קלאסטר משתמשים עם זמינות גבוהה, איזון עומסים של LDAP ו-BGP
שימו לב לתכונות ולאפשרויות הבאות בתצורת אשכול המשתמשים הזה:
- זמינות גבוהה
- LDAP
- איזון עומסים בחבילה עם BGP
apiVersion: v1
kind: Namespace
metadata:
name: cluster-user-ha-ldap
---
apiVersion: baremetal.cluster.gke.io/v1
kind: Cluster
metadata:
name: user-ha-ldap
namespace: cluster-user-ha-ldap
spec:
type: user
profile: default
anthosBareMetalVersion: 1.34.100-gke.93
gkeConnect:
projectID: project-fleet
controlPlane:
nodePoolSpec:
nodes:
- address: 10.200.0.20
- address: 10.200.0.21
- address: 10.200.0.22
clusterNetwork:
advancedNetworking: true
pods:
cidrBlocks:
- 192.168.0.0/16
services:
cidrBlocks:
- 10.96.0.0/20
loadBalancer:
mode: bundled
type: bgp
localASN: 65001
bgpPeers:
- ip: 10.8.0.10
asn: 65002
- ip: 10.8.0.11
asn: 65002
ports:
controlPlaneLBPort: 443
vips:
controlPlaneVIP: 10.200.0.91
ingressVIP: 10.200.0.92
addressPools:
- name: pool1
addresses:
- 10.200.0.92-10.200.0.100
clusterOperations:
projectID: project-fleet
location: us-central1
storage:
lvpNodeMounts:
path: /mnt/localpv-disk
storageClassName: local-disks
lvpShare:
path: /mnt/localpv-share
storageClassName: local-shared
numPVUnderSharedPath: 5
nodeConfig:
podDensity:
maxPodsPerNode: 250
authentication:
- name: ldap
ldap:
connectionType: ldaps
group:
baseDN: ou=Groups,dc=onpremidp,dc=example,dc=net
filter: (objectClass=*)
identifierAttribute: dn
host: ldap.google.com:636
user:
baseDN: ou=Users,dc=onpremidp,dc=example,dc=net
filter: (objectClass=*)
identifierAttribute: uid
loginAttribute: uid
serviceAccountSecret:
name: google-ldap-client-secret
namespace: anthos-identity-service
type: tls
---
apiVersion: baremetal.cluster.gke.io/v1
kind: NodePool
metadata:
name: np1
namespace: cluster-user-ha-ldap
spec:
clusterName: user-ha-ldap
nodes:
- address: 10.200.0.30
- address: 10.200.0.31
- address: 10.200.0.32
---
apiVersion: networking.gke.io/v1
kind: NetworkGatewayGroup
metadata:
name: default
namespace: cluster-user-ha-ldap
spec:
floatingIPs:
- 10.0.1.100
- 10.0.2.100