|
| 1 | +// Module included in the following assemblies: |
| 2 | +// * post_installation_configuration/sphere-failure-domain-configuration.adoc |
| 3 | + |
| 4 | +:_content-type: PROCEDURE |
| 5 | +[id="specifying-regions-zones-infrastructure-vsphere_{context}"] |
| 6 | += Specifying multiple regions and zones for your cluster on vSphere |
| 7 | + |
| 8 | +You can configure the `infrastructures.config.openshift.io` configuration resource to specify multiple regions and zones for your {product-title} cluster that runs on a VMware vSphere instance. |
| 9 | + |
| 10 | +Topology-aware features for the cloud controller manager and the vSphere Container Storage Interface (CSI) Operator Driver require information about the vSphere topology where you host your {product-title} cluster. This topology information exists in the `infrastructures.config.openshift.io` configuration resource. |
| 11 | + |
| 12 | +Before you specify regions and zones for your cluster, you must ensure that all datacenters and compute clusters contain tags, so that the cloud provider can add labels to your node. For example, if `datacenter-1` represents `region-a` and `compute-cluster-1` represents `zone-1`, the cloud provider adds an `openshift-region` category label with a value of `region-a` to `datacenter-1`. Additionally, the cloud provider adds an `openshift-zone` category tag with a value of `zone-1` to `compute-cluster-1`. |
| 13 | + |
| 14 | +[NOTE] |
| 15 | +==== |
| 16 | +You can migrate control plane nodes with vMotion capabilities to a failure domain. After you add these nodes to a failure domain, the cloud provider adds `topology.kubernetes.io/zone` and `topology.kubernetes.io/region` labels to these nodes. |
| 17 | +==== |
| 18 | + |
| 19 | +.Prerequisites |
| 20 | +* You created the `openshift-region` and `openshift-zone` tag categories on the vCenter server. |
| 21 | +* You ensured that each datacenter and compute cluster contains tags that represent the name of their associated region or zone, or both. |
| 22 | +* Optional: If you defined *API* and *Ingress* static IP addresses to the installation program, you must ensure that all regions and zones share a common layer 2 network. This configuration ensures that API and Ingress Virtual IP (VIP) addresses can interact with your cluster. |
| 23 | +
|
| 24 | +// Add link(s) that points to Day-0 docs for creating tags as soon as the Day-0 content is merged. |
| 25 | + |
| 26 | +[IMPORTANT] |
| 27 | +==== |
| 28 | +If you do not supply tags to all datacenters and compute clusters before you create a node or migrate a node, the cloud provider cannot add the `topology.kubernetes.io/zone` and `topology.kubernetes.io/region` labels to the node. This means that services cannot route traffic to your node. |
| 29 | +==== |
| 30 | + |
| 31 | +.Procedure |
| 32 | + |
| 33 | +. Edit the `infrastructures.config.openshift.io` custom resource definition (CRD) of your cluster to specify multiple regions and zones in the `failureDomains` section of the resource by running the following command: |
| 34 | ++ |
| 35 | +[source,terminal] |
| 36 | +---- |
| 37 | +$ oc edit infrastructures.config.openshift.io cluster |
| 38 | +---- |
| 39 | ++ |
| 40 | +.Example `infrastructures.config.openshift.io` CRD for a instance named `cluster` with multiple regions and zones defined in its configuration |
| 41 | ++ |
| 42 | +[source,yaml] |
| 43 | +---- |
| 44 | +spec: |
| 45 | + cloudConfig: |
| 46 | + key: config |
| 47 | + name: cloud-provider-config |
| 48 | + platformSpec: |
| 49 | + type: vSphere |
| 50 | + vsphere: |
| 51 | + vcenters: |
| 52 | + - datacenters: |
| 53 | + - <region_a_datacenter> |
| 54 | + - <region_b_datacenter> |
| 55 | + port: 443 |
| 56 | + server: <your_vcenter_server> |
| 57 | + failureDomains: |
| 58 | + - name: <failure_domain_1> |
| 59 | + region: <region_a> |
| 60 | + zone: <zone_a> |
| 61 | + server: <your_vcenter_server> |
| 62 | + topology: |
| 63 | + datacenter: <region_a_dc> |
| 64 | + computeCluster: "</region_a_dc/host/zone_a_cluster>" |
| 65 | + resourcePool: "</region_a_dc/host/zone_a_cluster/Resources/resource_pool>" |
| 66 | + datastore: "</region_a_dc/datastore/datastore_a>" |
| 67 | + networks: |
| 68 | + - port-group |
| 69 | + - name: <failure_domain_2> |
| 70 | + region: <region_a> |
| 71 | + zone: <zone_b> |
| 72 | + server: <your_vcenter_server> |
| 73 | + topology: |
| 74 | + computeCluster: </region_a_dc/host/zone_b_cluster> |
| 75 | + datacenter: <region_a_dc> |
| 76 | + datastore: </region_a_dc/datastore/datastore_a> |
| 77 | + networks: |
| 78 | + - port-group |
| 79 | + - name: <failure_domain_3> |
| 80 | + region: <region_b> |
| 81 | + zone: <zone_a> |
| 82 | + server: <your_vcenter_server> |
| 83 | + topology: |
| 84 | + computeCluster: </region_b_dc/host/zone_a_cluster> |
| 85 | + datacenter: <region_b_dc> |
| 86 | + datastore: </region_b_dc/datastore/datastore_b> |
| 87 | + networks: |
| 88 | + - port-group |
| 89 | + nodeNetworking: |
| 90 | + external: {} |
| 91 | + internal: {} |
| 92 | +---- |
| 93 | ++ |
| 94 | +[IMPORTANT] |
| 95 | +==== |
| 96 | +After you create a failure domain and you define it in a CRD for a VMware vSphere cluster, you must not modify or delete the failure domain. Doing any of these actions with this configuration can impact the availability and fault tolerance of a control plane machine. |
| 97 | +==== |
| 98 | + |
| 99 | +. Save the resource file to apply the changes. |
0 commit comments