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 allow you to upload YAML templates used to create the cluster, control plane, and worker nodes. This section provides instructions on how to download and modify YAML templates, upgrade the default Cluster API (CAPI) version, and use APIs to register a Nutanix cloud to Palette.
Prerequisites
-
A Nutanix Cluster API (CAPX) version compatible with the desired CAPI version. The default CAPI version for Palette is
v1.5.3
. Refer to the Nutanix CAPI Validated Integrations compatibility matrix for more information. -
A Nutanix Prism Central version compatible with the desired CAPX version. Refer to the Nutanix Prism Central Validated Integrations compatibility matrix for more information.
-
A Palette account with system console access. The user with this privilege is the system administrator 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 Palette and VerteX.
Customize YAML Configuration Files
Before you can register your Nutanix cloud with Palette, you must download the appropriate CAPX manifests and edit them accordingly so that the APIs can communicate with Palette.
You need to configure certain components explicitly, while others are optional and will fall back to default settings if
not configured. By default, Palette uses CAPI version v1.5.3
.
If you upgrade any optional component, we strongly recommend upgrading the other optional components to the same version to ensure compatibility.
Component | Requirement |
---|---|
cluster-template | Required |
control-plane-template | Required |
infrastructure-components | Required |
worker-template | Required |
bootstrap-components | Optional |
control-plane-components | Optional |
core-component | Optional |
Required Components
The following components are required to register your Nutanix cloud with Palette. Use the following procedure to download and format the manifests appropriately.
-
Review the Nutanix compatibility matrix to ensure your desired CAPX version is compatible with your CAPI version. Once you have verified they are compatible, export your CAPX version as an environment variable. For example, if you want to download version
v1.5.0
, issue the following command.export CAPX_VERSION="v1.5.0"
-
Issue the commands below to download the appropriate versions of
infrastructure-components.yaml
andcluster-template.yaml
.curl --remote-name --location https://github.com/nutanix-cloud-native/cluster-api-provider-nutanix/releases/download/$CAPX_VERSION/cluster-template.yaml
curl --remote-name --location 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.cp cluster-template.yaml cloudClusterTemplate.yaml
cp cluster-template.yaml controlPlanePoolTemplate.yaml
mv cluster-template.yaml workerPoolTemplate.yaml -
Verify that you have the following files downloaded using a command such as
ls -l
.infrastructure-components.yaml
cloudClusterTemplate.yaml
controlPlanePoolTemplate.yaml
workerPoolTemplate.yaml
-
Open the
cloudClusterTemplate.yaml
,controlPlanePoolTemplate.yaml
, andworkerPoolTemplate.yaml
files in your editor of choice. -
Modify the YAML files so that only the top-level objects listed in the table below remain in each file.
Template Objects to Keep cloudClusterTemplate.yaml
ConfigMap
Secret
Cluster
MachineHealthCheck
NutanixCluster
controlPlanePoolTemplate.yaml
KubeadmControlPlane
NutanixMachineTemplate
workerPoolTemplate.yaml
KubeadmConfigTemplate
MachineDeployment
NutanixMachineTemplate
-
In all three templates, remove all occurrences of
${NAMESPACE}
, as Palette provides its own namespace. -
In
controlPlanePoolTemplate.yaml
, make the following changes.-
In the
KubeadmControlPlane
object, renamespec.machineTemplate.infrastructureRef.name:
to${CLUSTER_NAME}-cp-0
. -
In the
KubeadmControlPlane
object, below thespec.kubeadmConfigSpec.preKubeadmCommands:
line, add the line- systemctl enable --now iscsid
to enable thenutanix-csi
pack, keeping proper indentation as illustrated below.preKubeadmCommands:
- systemctl enable --now iscsid -
In the
NutanixMachineTemplate
object, renamemetadata.name:
to${CLUSTER_NAME}-cp-0
. -
In the
NutanixMachineTemplate
object, renamespec.template.spec.providerID:
tonutanix://${CLUSTER_NAME}-m1-cp-0
.
-
-
In
workerPoolTemplate.yaml
, make the following changes.-
In the
NutanixMachineTemplate
object, renamespec.template.spec.providerID:
tonutanix://${CLUSTER_NAME}-m1-mt-0
. -
In the
KubeadmConfigTemplate
object, below thespec.template.spec.preKubeadmCommands:
line, add the line- systemctl enable --now iscsid
to enable thenutanix-csi
pack, keeping proper indentation as illustrated below.preKubeadmCommands:
- systemctl enable --now iscsid
-
-
(VerteX only) Make the following modifications for VerteX environments.
Additional VerteX Modifications
-
In
controlPlanePoolTemplate.yaml
, edit theKubeadmControlPlane
object. Below bothkubeletExtraArgs:
lines, add the linerotate-server-certificates: "true"
, keeping proper indentation as illustrated below.kubeletExtraArgs:
rotate-server-certificates: "true" -
In
workerPoolTemplate.yaml
, edit theKubeadmConfigTemplate
object. BelowkubeletExtraArgs:
, add the linerotate-server-certificates: "true"
, keeping proper indentation as illustrated below.kubeletExtraArgs:
rotate-server-certificates: "true"
-
If you are not upgrading the core CAPI version or another optional component, proceed to the Register the Cloud section of this guide.
Optional Components
To use a core, bootstrap, or control plane component other than v1.5.3
, you must specify the desired version and
download additional CAPI manifests. If you upgrade one of these components, we strongly recommend upgrading the others
to the same version to ensure compatibility.
The following example upgrades all three optional components.
-
Export your CAPI version as an environment variable. For example, if you want to download version
v1.8.6
, issue the following command.export CAPI_VERSION="v1.8.6"
-
Issue the commands below to download the optional components. If you do not wish to upgrade all three components, download only the ones you need.
curl --remote-name --location https://github.com/kubernetes-sigs/cluster-api/releases/download/$CAPI_VERSION/bootstrap-components.yaml
curl --remote-name --location https://github.com/kubernetes-sigs/cluster-api/releases/download/$CAPI_VERSION/control-plane-components.yaml
curl --remote-name --location https://github.com/kubernetes-sigs/cluster-api/releases/download/$CAPI_VERSION/core-components.yaml -
Verify that you have the applicable files downloaded using a command such as
ls -l
.bootstrap-components.yaml
control-plane-components.yaml
core-components.yaml
Generally, these manifests do not require additional modifications and are designed to work as-is. If you need to customize these files, do so now.
Register the Cloud
Follow the steps below to set the necessary 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 100 KB 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 must be set asnutanix
, as this value will be used in the following steps. -
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 the
TOKEN
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.infoYou must set the cloud
name
asnutanix
to automatically make the out-of-the-boxnutanix-csi
pack available to users when they create a cluster profile in Palette.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}" -
(Optional) If you configured any optional components to use a specific CAPI version, register them using the following API calls.
Modify CAPI Version
-
Export the paths to the optional component YAML files.
export coreComponentsTemplate="/path/to/the/file/core-components.yaml"
export controlPlaneComponentsTemplate="/path/to/the/file/control-plane-components.yaml"
export bootstrapComponentsTemplate="/path/to/the/file/bootstrap-components.yaml" -
Register the core component.
curl --location --request PUT "${ENDPOINT}/v1/clouds/cloudTypes/${CLOUD_TYPE}/content/core" \
--header "Content-Type: multipart/form-data" \
--header "Cookie: Authorization=${TOKEN}" \
--form "fileName=@${coreComponentsTemplate}" -
Register the control plane component.
curl --location --request PUT "${ENDPOINT}/v1/clouds/cloudTypes/${CLOUD_TYPE}/content/controlPlane" \
--header "Content-Type: multipart/form-data" \
--header "Cookie: Authorization=${TOKEN}" \
--form "fileName=@${controlPlaneComponentsTemplate}" -
Register the bootstrap component.
curl --location --request PUT "${ENDPOINT}/v1/clouds/cloudTypes/${CLOUD_TYPE}/content/bootstrap" \
--header "Content-Type: multipart/form-data" \
--header "Cookie: Authorization=${TOKEN}" \
--form "fileName=@${bootstrapComponentsTemplate}"
-
-
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
Follow the steps below to confirm that the Nutanix cloud is successfully registered with Palette.
-
Log in to Palette as a tenant admin.
-
From the left main menu, select Tenant Settings.
-
Under Cloud Accounts, verify that Nutanix 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.