Register Nutanix Cloud
A system administrator registers the Nutanix cloud in Palette by invoking system-level APIs. These APIs provide specific cloud information, the cloud logo, and the key-value pairs required to add the cloud to Palette. They also enable uploading the YAML templates used to create the cluster, control plane, and worker nodes. This section provides instructions on how to download and modify the YAML templates, as well as how to use the APIs to register a Nutanix cloud to Palette.
Prerequisites
-
Nutanix Prism Central with a supported version for CAPI version 1.2.x. Refer to the Nutanix Validated Integrations compatibility matrix.
-
The Nutanix CAPI version must be v1.2.x.
-
A Palette account with system console access. The user with this privilege is the system administrator user of the self-hosted Palette or VerteX instance.
-
A Nutanix logo downloaded. Review logo requirements in Register the Cloud.
-
curl
command installed or the method of your choice to make API calls for standard Palette and Palette VerteX.
Setup
Use the following steps to prepare to register your cloud with Palette.
Customize YAML Configuration Files
-
Access the Nutanix CAPI Provider Releases GitHub page and execute the commands below to download the following YAML files from a specific version of the Nutanix Cluster API Provider (CAPX) that is compatible with your environment.
- infrastructure-components.yaml
- cluster-template.yaml
warningReview the Nutanix compatibility matrix to ensure you download a compatible CAPX version of the files.
Export the CAPX version as an environment variable. For example, if you want to download version v1.2.4, issue the following command.
export CAPX_VERSION="v1.2.4"
Next, issue the commands below to download the files.
curl -LO https://github.com/nutanix-cloud-native/cluster-api-provider-nutanix/releases/download/$CAPX_VERSION/cluster-template.yaml
curl -LO https://github.com/nutanix-cloud-native/cluster-api-provider-nutanix/releases/download/$CAPX_VERSION/infrastructure-components.yaml -
Create two copies of
cluster-template.yaml
and rename them so you have the following files in addition to theinfrastructure-components.yaml
:- cloudClusterTemplate.yaml
- controlPlanePoolTemplate.yaml
- workerPoolTemplate.yaml
Use the following commands to copy and rename the files.
cp cluster-template.yaml cloudClusterTemplate.yaml
cp cluster-template.yaml controlPlanePoolTemplate.yaml
mv cluster-template.yaml workerPoolTemplate.yaml -
Open the cloudClusterTemplate.yaml, controlPlanePoolTemplate.yaml, and workerPoolTemplate.yaml files in the editor of your choice.
-
Modify the YAML files to remove sections so that only those sections listed in the table below remain in each file.
tipWhen editing the YAMLs, it is helpful to collapse the
spec
section to help you identify the sections to remove.Templates Objects cloudClusterTemplate.yaml ConfigMap
Secret
Cluster
NutanixCluster
MachineHealthCheckcontrolPlanePoolTemplate.yaml KubeadmControlPlane
NutanixMachineTemplateworkerPoolTemplate.yaml KubeadmConfigTemplate
MachineDeployment
NutanixMachineTemplate -
In all three templates, remove all occurrences of
${NAMESPACE}
, as Palette provides its own namespace. -
In controlPlanePoolTemplate.yaml, edit the KubeadmControlPlane object. Rename
machineTemplate.name: ${CLUSTER_NAME}-mt-0
as${CLUSTER_NAME}-cp-0
. -
In controlPlanePoolTemplate.yaml, edit the NutanixMachineTemplate object. Rename
name: ${CLUSTER_NAME}-mt-0
as${CLUSTER_NAME}-cp-0
, and changeproviderID
tonutanix://${CLUSTER_NAME}-m1-cp-0
.warningThe
${CLUSTER_NAME}-cp-0
parameters for the KubeadmControlPlane and NutanixMachineTemplate objects must have the same name. -
In controlPlanePoolTemplate.yaml, edit the KubeadmControlPlane object to enable the Nutanix CSI pack. Include a new line with the
- systemctl enable --now iscsid
command below thepreKubeadmCommands:
line, keeping proper indentation as illustrated below.preKubeadmCommands:
- systemctl enable --now iscsid -
In workerPoolTemplate.yaml, change
providerID
toproviderID: nutanix://${CLUSTER_NAME}-m1-mt-0
within theNutanixMachineTemplate
object. -
In workerPoolTemplate.yaml, edit the KubeadmConfigTemplate object to enable the Nutanix CSI pack. Include a new line with the
- systemctl enable --now iscsid
command below thepreKubeadmCommands:
line, keeping proper indentation as illustrated below.preKubeadmCommands:
- systemctl enable --now iscsid
The following modifications in steps 11 and 12 are only applicable to VerteX instances.
-
In controlPlanePoolTemplate.yaml, edit the KubeadmControlPlane object. Include a new line with
rotate-server-certificates: "true"
below the two occurrences of thekubeletExtraArgs:
line, keeping proper indentation as illustrated below.kubeletExtraArgs:
rotate-server-certificates: "true" -
In workerPoolTemplate.yaml, edit the KubeadmConfigTemplate object. Include a new line with
rotate-server-certificates: "true"
below thekubeletExtraArgs:
line, keeping proper indentation as illustrated below.kubeletExtraArgs:
rotate-server-certificates: "true"
Validate
Use the steps below to confirm you have the required files and verify the required sections are removed and modified.
-
From your terminal, issue a command such as
ls -l
to list the files and confirm you have the following YAML templates:- infrastructure-components.yaml
- cloudClusterTemplate.yaml
- controlPlanePoolTemplate.yaml
- workerPoolTemplate.yaml
-
Ensure each template contains objects as listed in the table.
Templates Objects cloudClusterTemplate.yaml ConfigMap
Secret
Cluster
NutanixCluster
MachineHealthCheckcontrolPlanePoolTemplate.yaml KubeadmControlPlane
NutanixMachineTemplateworkerPoolTemplate.yaml KubeadmConfigTemplate
MachineDeployment
NutanixMachineTemplate -
Open each file and verify that all occurrences of
${NAMESPACE}
are removed. -
In the controlPlanePoolTemplate.yaml file, ensure
${CLUSTER_NAME}-cp-0
for the KubeadmControlPlane and NutanixMachineTemplate objects have the same name. -
Verify parameters are modified as described for each template in steps 6 and 7 of Customize YAML Configuration Files.
Register the Cloud
Follow the steps below from your terminal to set the environment variables and invoke the APIs required to register a Nutanix cloud to Palette. Alternatively, you can use an API platform such as Postman.
Prerequisites
-
You have completed the steps in Customize YAML Configuration Files.
-
Only an Operations Administrator is allowed to register a Nutanix cloud.
-
The logo file must not exceed 100KB in size. To ensure image quality ensure at least one dimension in either width or height is 40 pixels. It is preferable that the image be transparent.
Enablement
-
Export the URL of your self-hosted Palette or VerteX instance and the cloud type as environment variables. Additionally, export the path to the YAML templates and logo file.
export ENDPOINT="https://palette.example.com"
export CLOUD_TYPE="nutanix"
export cloudLogo="/path/to/the/file/cloud-logo.png"
export infraComponents="/path/to/the/file/infrastructure-components.yaml"
export cloudClusterTemplate="/path/to/the/file/cloudClusterTemplate.yaml"
export controlPlanePoolTemplate="/path/to/the/file/controlPlanePoolTemplate.yaml"
export workerPoolTemplate="/path/to/the/file/workerPoolTemplate.yaml"warningThe CLOUD_TYPE variable value must be set as
nutanix
, as this value will be used in the following steps.Moreover, in the cloud registration API, set
name
asnutanix
. Settingname
asnutanix
will make the out-of-the-box Nutanix CSI pack available to users when they create a cluster profile in Palette. -
To acquire system administrator credentials, use the
/v1/auth/syslogin
endpoint. Issue thecurl
command below and ensure you replace the credentials with your system console credentials.curl --location "${ENDPOINT}/v1/auth/syslogin" \
--header 'Content-Type: application/json' \
--data '{
"password": "**********",
"username": "**********"
}'The output contains your authorization token. The token is valid for 15 minutes.
{
"Authorization": "**********",
"IsPasswordReset": true
} -
Copy the authorization token, assign it to a
TOKEN
shell variable, and export it. Replace the authorization value below with the value from the output.export TOKEN="**********"
-
Register the Nutanix cloud type in Palette using the
/v1/clouds/cloudTypes/register
endpoint.curl --location --request POST "${ENDPOINT}/v1/clouds/cloudTypes/register" \
--header "Content-Type: application/json" \
--header "Authorization: ${TOKEN}" \
--data '{
"metadata": {
"annotations": {},
"labels": {},
"name": "nutanix"
},
"spec": {
"displayName": "Nutanix",
"isControlPlaneManaged": false
}
}' -
Upload the Nutanix cloud logo.
curl --location --request PUT "${ENDPOINT}/v1/clouds/cloudTypes/${CLOUD_TYPE}/logo" \
--header "Authorization: ${TOKEN}" \
--form "fileName=@${cloudLogo}" -
Register the cloud provider.
curl --location --request PUT "${ENDPOINT}/v1/clouds/cloudTypes/${CLOUD_TYPE}/content/cloudProvider" \
--header "Content-Type: multipart/form-data" \
--header "Authorization: ${TOKEN}" \
--form "fileName=@${infraComponents}" -
Register the cluster template.
curl --location --request PUT "${ENDPOINT}/v1/clouds/cloudTypes/${CLOUD_TYPE}/content/templates/clusterTemplate" \
--header "Content-Type: multipart/form-data" \
--header "Authorization: ${TOKEN}" \
--form "fileName=@${cloudClusterTemplate}" -
Register the control plane pool template.
curl --location --request PUT "${ENDPOINT}/v1/clouds/cloudTypes/${CLOUD_TYPE}/content/templates/controlPlanePoolTemplate" \
--header "Content-Type: multipart/form-data" \
--header "Authorization: ${TOKEN}" \
--form "fileName=@${controlPlanePoolTemplate}" -
Register the worker pool template.
curl --location --request PUT "${ENDPOINT}/v1/clouds/cloudTypes/${CLOUD_TYPE}/content/templates/workerPoolTemplate" \
--header "Content-Type: multipart/form-data" \
--header "Authorization: ${TOKEN}" \
--form "fileName=@${workerPoolTemplate}" -
Register the cloud account keys.
curl --location --request PUT "${ENDPOINT}/v1/clouds/cloudTypes/${CLOUD_TYPE}/cloudAccountKeys" \
--header "Content-Type: application/json" \
--header "Authorization: ${TOKEN}" \
--data '{
"keys": [
"NUTANIX_USER",
"NUTANIX_PASSWORD",
"NUTANIX_ENDPOINT",
"NUTANIX_PORT",
"NUTANIX_INSECURE"
]
}'
Validate
Use the steps below to confirm that the Nutanix cloud is successfully registered in Palette.
-
Log in to Palette as a tenant admin.
-
Navigate to the left Main Menu and select Tenant Settings.
-
Next, on the Tenant Settings Menu, select Cloud Accounts.
-
Verify that the added Nutanix account section is listed. You may need to scroll to view the account.
Next Steps
Now that your cloud is successfully registered with Palette, you are ready to deploy a self-hosted Private Cloud Gateway (PCG). For guidance, review Install Private Cloud Gateway.