[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-03。"],[],[],null,["| **Preview**\n|\n|\n| This feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nThis page provides an overview of topology domains and guidelines for setting\nthem up.\n\nSetting up a topology domain requires that you enable\n[advanced cluster](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/admin-cluster-configuration-file-latest#enable-advanced-cluster-field).\nNote the following limitations with the advanced cluster preview:\n\n- You can enable advanced cluster at cluster creation time for new 1.31 clusters only.\n- After advanced cluster is enabled, you won't be able to upgrade the cluster to 1.32. Only enable advanced cluster in a test environment.\n\nThis page is for Admins and architects who define IT solutions and system\narchitecture in accordance with company strategy, and create and manage policies\nrelated to user permissions. To learn more about common roles and example tasks\nthat we reference in Google Cloud content, see\n[Common GKE user roles and tasks](/kubernetes-engine/enterprise/docs/concepts/roles-tasks).\n\nOverview\n\nA *topology domain* is a group of cluster nodes that are considered to be part\nof the same logical or physical grouping such as a campus or data center. A\ntopology domain should correspond to some underlying hardware or software\nthat has some possibility of correlated failure. For example:\n\n- Software failure such as different vCenter Servers\n- Hardware failure such as different racks, different power sources, and different buildings\n\nIn Google Distributed Cloud (software only) for VMware, as part of setting up a topology\ndomain when you create a cluster, you define a [topology\nlabel](/kubernetes-engine/distributed-cloud/vmware/docs/reference/vsphere-infrastructure-configuration-file#topology-domains-topology-labels).\nAfter cluster creation, the topology label is populated to labels of nodes in\nthe topology domain.\n\nTo make use of a topology domain, you have the following options:\n\n- Version 1.32 and higher: Configure cluster-level default topology spread\n constraints. For details, see\n [`schedulerConfiguration`](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/user-cluster-configuration-file-latest#scheduler-configuration-section).\n\n- Use the Kubernetes cluster-level default constraint,\n `\"topology.kubernetes.io/zone\"`, as the key in the topology label. For more\n information, see\n [Built-in default constraints](https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints).\n\n- Configure the `PodTemplate` in your Deployment, StatefulSet, or ReplicaSet,\n as applicable with the topology label key. In the Pod spec, you use the key\n in the topology label as the value for the\n `topologySpreadConstraints.topologyKey` field. This key lets the Kubernetes\n scheduler distribute Pods across the topology domain to ensure high\n availability and prevent over-concentration in any single area in case of\n failure. For more information on configuring `topologySpreadConstraints` in\n your Pod spec, see\n [Pod Topology Spread Constraints](https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/)\n in the Kubernetes documentation.\n\nExample topology domain labels\n\nSuppose you create the following three topology domains when\n[creating a user cluster](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/create-user-cluster-topology-domains#fill_in_your_vsphere_infrastructure_configuration_file): \n\n ...\n topologyDomains:\n - name: \"topology-domain-1\"\n topologyLabels:\n \"topology.examplepetstore.com/zone\": \"zone-1\"\n ...\n\n ...\n topologyDomains:\n - name: \"topology-domain-2\"\n topologyLabels:\n \"topology.examplepetstore.com/zone\": \"zone-2\"\n ...\n\n ...\n topologyDomains:\n - name: \"topology-domain-3\"\n topologyLabels:\n \"topology.examplepetstore.com/zone\": \"zone-3\"\n ...\n\nAfter the cluster is created, you update the Pod spec, for example: \n\n ...\n topologySpreadConstraints:\n topologyKey: \"topology.examplepetstore.com/zone\"\n ...\n\nAt a high level, the Kubernetes scheduler uses\n`topology.examplepetstore.com/zone` to separate the cluster nodes into\ndifferent groups, `zone-1`, `zone-2`, and `zone-3`. Then the scheduler spreads\nthe Pods across these three node groups.\n\nGuidelines for Topology Domains Setup\n\nTo ensure effective use of all clusters resources by the Kubernetes scheduler,\nwe recommend the following guidelines:\n\n\u003cbr /\u003e\n\n- The topology domains need to be balanced. You should provide nearly equal amounts of CPU and RAM capacity in each topology domain.\n- Provide at least two and preferably three topology domains.\n- Don't spread by more than one topology key.\n- The nodes should have a similar size in each topology domain.\n- If you use [taints and tolerations](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/node-taints) for workload separation within a cluster, then each node group should meet the previous requirements.\n\nIf these guidelines aren't met, then the scheduler will still try to use the\nfull capacity of the cluster, but it might take longer to schedule Pods, and not\nall Pods will get the expected spreading behavior.\n\nWhat's next\n\n- [Create an admin cluster for use in topology domains](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/create-admin-cluster-topology-domains)\n- [Create a user cluster for use in topology domains](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/create-user-cluster-topology-domains)\n- [vSphere infrastructure configuration file](/kubernetes-engine/distributed-cloud/vmware/docs/reference/vsphere-infrastructure-configuration-file)"]]