Control plane configuration options for VMware vSphere
You can update your control plane machines to reflect changes in your infrastructure or environment by editing values in the control plane machine set specification.
When you save an update to the control plane machine set, the Control Plane Machine Set Operator updates the control plane machines according to your configured update strategy. For more information, see "Updating the control plane configuration".
The following example YAML snippets show provider specification and failure domain configurations for a vSphere cluster.
Sample vSphere provider specification
You can update your control plane machines to reflect changes in your underlying infrastructure by editing values in the control plane machine set provider specification.
The following example YAML illustrates a valid configuration for a VMware vSphere cluster.
When you create a control plane machine set for an existing cluster, the provider specification must match the providerSpec configuration in the control plane machine custom resource (CR) that the installation program creates.
You can omit any field that has a value set in the failure domain section of the CR.
apiVersion: machine.openshift.io/v1
kind: ControlPlaneMachineSet
metadata:
name: cluster
namespace: openshift-machine-api
spec:
# ...
template:
# ...
spec:
providerSpec:
value:
apiVersion: machine.openshift.io/v1beta1
credentialsSecret:
name: vsphere-cloud-credentials
dataDisks:
- name: "<disk_name>"
provisioningMode: "<mode>"
sizeGiB: 20
diskGiB: 120
kind: VSphereMachineProviderSpec
memoryMiB: 16384
metadata:
creationTimestamp: null
network:
devices:
- networkName: <vm_network_name>
numCPUs: 4
numCoresPerSocket: 4
snapshot: ""
template: <vm_template_name>
userDataSecret:
name: master-user-data
workspace:
datacenter: <vcenter_data_center_name>
datastore: <vcenter_datastore_name>
folder: <path_to_vcenter_vm_folder>
resourcePool: <vsphere_resource_pool>
server: <vcenter_server_ip>where:
spec.template.spec.providerSpec.value.credentialsSecretSpecifies the secret name for the cluster. Do not change this value.
spec.template.spec.providerSpec.value.dataDisksSpecifies one or more data disk definitions. For more information, see "Configuring data disks by using machine sets".
spec.template.spec.providerSpec.value.diskGiBSpecifies the VM disk size for the control plane machines.
spec.template.spec.providerSpec.value.kindSpecifies the cloud provider platform type. Do not change this value.
spec.template.spec.providerSpec.value.memoryMiBSpecifies the memory allocated for the control plane machines.
spec.template.spec.providerSpec.value.networkSpecifies the network on which to deploy the control plane.
NoteIf the cluster uses a failure domain, configure this parameter in the failure domain. If you specify this value in the provider specification when using a failure domain, the Control Plane Machine Set Operator ignores it and uses the value in the failure domain.
spec.template.spec.providerSpec.value.numCPUsSpecifies the number of CPUs allocated for the control plane machines.
spec.template.spec.providerSpec.value.numCoresPerSocketSpecifies the number of cores for each control plane CPU.
spec.template.spec.providerSpec.value.templateSpecifies the vSphere VM template to use, such as
user-5ddjd-rhcos.NoteIf the cluster uses a failure domain, configure this parameter in the failure domain. If you specify this value in the provider specification when using a failure domain, the Control Plane Machine Set Operator ignores it and uses the value in the failure domain.
spec.template.spec.providerSpec.value.userDataSecretSpecifies the control plane user data secret. Do not change this value.
spec.template.spec.providerSpec.value.workspaceSpecifies the workspace details for the control plane.
NoteIf the cluster uses a failure domain, configure this parameter in the failure domain. If you specify this value in the provider specification when using a failure domain, the Control Plane Machine Set Operator ignores it and uses the value in the failure domain.
The following keys in this stanza specify additional details:
datacenterSpecifies the vCenter datacenter for the control plane.
datastoreSpecifies the vCenter datastore for the control plane.
folderSpecifies the path to the vSphere VM folder in vCenter, such as
/dc1/vm/user-inst-5ddjd.resourcePoolSpecifies the vSphere resource pool for your VMs.
serverSpecifies the vCenter server IP or fully qualified domain name.
Sample VMware vSphere failure domain configuration
To prevent downtime for your applications due to the failure of a single VMware vSphere region, you can configure failure domains in the control plane machine set by configuring appropriate values in the failureDomains section of the ControlPlaneMachineSet object.
On vSphere infrastructure, the cluster-wide infrastructure custom resource definition (CRD), infrastructures.config.openshift.io, defines failure domains for your cluster. A failure domain is an infrastructure resource made up of a control plane machine set, a vCenter data center, vCenter datastore, and a network. The providerSpec in the ControlPlaneMachineSet custom resource (CR) specifies names for failure domains that the control plane machine set uses to ensure control plane nodes deploy on the appropriate failure domain.
By using a failure domain resource, you can use a control plane machine set to deploy control plane machines on separate clusters or data centers. A control plane machine set also balances control plane machines across defined failure domains to improve fault tolerance capabilities for your infrastructure.
If you change the ProviderSpec configuration in the ControlPlaneMachineSet CR, the Control Plane Machine Set Operator updates the control plane machines according to your configured update strategy.
apiVersion: machine.openshift.io/v1
kind: ControlPlaneMachineSet
metadata:
name: cluster
namespace: openshift-machine-api
spec:
# ...
template:
# ...
machines_v1beta1_machine_openshift_io:
failureDomains:
vsphere:
- name: <failure_domain_name_1>
- name: <failure_domain_name_2>
platform: VSphere
# ...where:
spec.template.machines_v1beta1_machine_openshift_io.failureDomains.vsphere.nameEach instance of
namespecifies a failure domain.ImportantEach
namefield value in the stanza must match the corresponding value in thefailureDomains.namefield of the cluster-wide infrastructure CRD. You can find the value of thefailureDomains.namefield by running the following command:terminal$ oc get infrastructure cluster -o=jsonpath={.spec.platformSpec.vsphere.failureDomains[0].name}The
namefield is the only supported failure domain field that you can specify in theControlPlaneMachineSetCR.For an example of a cluster-wide infrastructure CRD that defines resources for each failure domain, see "Specifying multiple regions and zones for your cluster on vSphere."
spec.template.machines_v1beta1_machine_openshift_io.failureDomains.platformSpecifies the cloud provider platform name. Do not change this value.