// Module included in the following assemblies:
//
// * post_installation_configuration/adding-nutanix-failure-domains.adoc

:_mod-docs-content-type: PROCEDURE
[id="post-installation-configuring-nutanix-failure-domains_{context}"]
= Adding failure domains to the Infrastructure CR

[role="_abstract"]
You add failure domains to an existing Nutanix cluster by modifying its Infrastructure custom resource (CR) (`infrastructures.config.openshift.io`).

[TIP]
====
To ensure high-availability, configure three failure domains.
====

.Procedure

. Edit the Infrastructure CR by running the following command:
+
[source,terminal]
----
$ oc edit infrastructures.config.openshift.io cluster
----

. Configure the failure domains.
+
.Example Infrastructure CR with Nutanix failure domains
[source,yaml]
----
spec:
  cloudConfig:
    key: config
    name: cloud-provider-config
#...
  platformSpec:
    nutanix:
      failureDomains:
      - cluster:
         type: UUID
         uuid: <uuid>
        name: <failure_domain_name>
        subnets:
        - type: UUID
          uuid: <network_uuid>
      - cluster:
         type: UUID
         uuid: <uuid>
        name: <failure_domain_name>
        subnets:
        - type: UUID
          uuid: <network_uuid>
      - cluster:
          type: UUID
          uuid: <uuid>
        name: <failure_domain_name>
        subnets:
        - type: UUID
          uuid: <network_uuid>
# ...
----
where:

`<uuid>`:: Specifies the universally unique identifier (UUID) of the Prism Element.
`<failure_domain_name>`:: Specifies a unique name for the failure domain. The name is limited to 64 or fewer characters, which can include lower-case letters, digits, and a dash (`-`). The dash cannot be in the leading or ending position of the name.
`<network_uuid>`:: Specifies one or more UUID for the Prism Element subnet object. 
The CIDR IP address prefix for one of the specified subnets must contain the virtual IP addresses that the {product-title} cluster uses.
+
--
:FeatureName: Configuring multiple subnets
include::snippets/technology-preview.adoc[]
--
+
To configure multiple subnets in the Infrastructure CR, you must enable the `NutanixMultiSubnets` feature gate.
A maximum of 32 subnets for each failure domain (Prism Element) in an {product-title} cluster is supported.
All subnet UUID values must be unique.

. Save the CR to apply the changes.
