Build Cluster Definition
With locally managed Edge, you must export the cluster profile from Palette as a cluster definition and upload it to the Edge device. A cluster definition contains one or more cluster profiles, including their profile variables.
A content bundle is an archive that includes all required container images for one or more profiles. It contains the Helm charts and packs files needed to deploy your Edge host cluster. In addition to core container images, the content bundle can also include application artifacts that you want to deploy to the Edge cluster. You can upload a content bundle when a locally managed Edge device has no access to public or private registries. Since this tutorial assumes access to either, you will use a cluster definition instead.
This tutorial teaches you how to create a cluster definition of the cluster profile you created in the Create Edge Cluster Profile tutorial using the Palette CLI.

Prerequisites
-
You have completed the steps in the Create Edge Cluster Profile and Prepare Edge Host tutorials.
-
The Edge device has access to the same public or private registries used to build the cluster profile.
-
A valid Palette API key.
-
The ID of the project where you created your cluster profile.
-
The cluster profile ID.
-
A physical or virtual Linux machine with AMD64 (also known as x86_64) processor architecture. You can issue the following command in the terminal to check your processor architecture.
uname -m
Export Cluster Definition
Download the Palette CLI to your Linux machine. This tutorial uses the Palette CLI version 4.8.7.
wget https://software.spectrocloud.com/palette-cli/v4.8.7/cli/linux/palette
chmod +x palette
Authenticate with Palette using the login command. Replace <your-api-key> with your Palette API key.
palette login --api-key <your-api-key> --console-url https://console.spectrocloud.com
Then execute the palette content build command to export a cluster definition for the specified cluster profile within
a designated project. This command generates a TGZ cluster definition file in the <current-directory>/output/ folder,
and a content bundle in the <current-directory>/output/content-bundle/ folder by default. The table below lists the
flags used in the command.
| Flag | Description |
|---|---|
--arch | The architecture of the bundle to be built. The available options are amd64 and arm64. |
--project-id | The ID of the Palette project. |
--profile | Comma-separated list of cluster profile IDs to download content for the content bundle. For this tutorial, only one cluster profile ID is needed. |
--cluster-definition-name | The filename of the cluster definition TGZ file. |
--cluster-definition-profile-ids | A comma-separated list of cluster profile IDs to be included in the cluster definition. For this tutorial, only one cluster profile ID is needed. |
--name | The name of the content bundle. This is required to generate bundles with unique names. If not provided, the command generates a default name in the <bundle>-<project-id> format, which is not unique and may lead to issues, as bundles using the same default name can be overwritten during upload to Local UI. |
Execute the following Palette CLI command to generate the cluster profile compressed TGZ file.
./palette content build --arch <bundle-architecture> \
--project-id <project-id> \
--profiles <cluster-profile-id1,cluster-profile-id2...> \
--cluster-definition-name <cluster-definition-name> \
--cluster-definition-profile-ids <cluster-definition-profile-ids> \
--name <bundle-name>
Alternatively, use the interactive script below to be prompted for the required values when executing the Palette CLI command. The API key appears blank for security reasons.
#!/usr/bin/env bash
set -euo pipefail
# --- Inputs ---
read -rsp "Enter Palette API key: " apikey
echo
read -rp "Enter Palette Project UID: " projectuid
read -rp "Enter Cluster Profile UID(s) (comma-separated if multiple): " profileuids
read -rp "Palette console URL [https://console.spectrocloud.com]: " console_url
read -rp "Enter custom tag (used for naming): " custom_tag
read -rsp "Enter Palette CLI encryption passphrase: " enc_pass
echo
# Default console URL
console_url=${console_url:-https://console.spectrocloud.com}
bundle_name="${custom_tag}-content-bundle"
definition_name="${custom_tag}-cluster-definition"
echo
echo "Logging into Palette CLI..."
palette login \
--api-key "${apikey}" \
--console-url "${console_url}" \
--encryption-passphrase "${enc_pass}"
echo
echo "Building content bundle..."
echo " Cluster definition: ${definition_name}"
echo " Bundle name: ${bundle_name}"
echo
palette content build \
--arch amd64 \
--project-id "${projectuid}" \
--profiles "${profileuids}" \
--cluster-definition-name "${definition_name}" \
--cluster-definition-profile-ids "${profileuids}" \
--name "${bundle_name}" \
--include-core-palette-images-only \
--progress
bundle_path="./output/content-bundle/${bundle_name}.tar.zst"
echo
echo "Done ✅"
echo
echo "Content bundle created:"
echo " ${bundle_path}"
echo
echo "Transfer this file to the airgapped Edge device and upload it via:"
echo " - Local UI"
echo " - or: palette content upload (from a reachable system)"
echo
After the TGZ file is built, upload it to the locally managed Edge device using the Local UI. If you are accessing the
Local UI from a system other than the Linux system where the file was generated, download the TGZ file first. For
example, you can use scp to copy the file from the remote Linux system to your current directory.
scp <username>@<ip-of-linux-system>:/path/to/<filename>.tgz .
Next Steps
In this tutorial, you learned how to create and download a cluster definition to be used on your Edge device. We recommend proceeding to the Deploy Cluster tutorial to learn how to deploy the cluster on a locally managed Edge device.