Skip to main content

Upload Cluster Images to Registry with the CLI

Palette Edge allows you to deploy a cluster using an external private registry. When you deploy a cluster using an external registry, all images required by the cluster are expected to be in the registry before deployment starts.

It can be error-prone to upload the images manually one by one. Therefore, we recommend you use the Palette CLI or the Palette Edge CLI to download the images and upload them to the external registry.

Limitations

  • You cannot use the Palette Edge CLI to upload images to the primary registry. You must use the Palette CLI instead.

Prerequisites

  • Linux Machine (Physical or VM) with an AMD64 architecture.

  • Palette API key. Refer to the User Authentication resource to learn how to create a Palette API key.

  • An Edge Native cluster profile. Refer to Create Edge Native Cluster Profile guide to learn how to create an Edge Native cluster profile. You may also have other add-on profiles that you wish to attach to your cluster.

  • Content tags in your profiles highlight the exact location of container images to be downloaded.

  • Edge content bundles created with Edge CLI version greater than 4.5.5, are incompatible with Palette agent versions before 4.5.4 due to a new format schema. If you are using an older version of the Palette agent, use the Edge CLI version 4.5.3 or earlier to create content bundles. To download the latest version of the Edge CLI, visit the Downloads page.

Upload Cluster Images to Registry

  1. Download the Palette CLI. Refer to the Palette CLI Compatibility Matrix to find a compatible CLI version and replace <palette-cli-version> with the selected version.

    VERSION=<palette-cli-version>
    wget https://software.spectrocloud.com/palette-cli/v$VERSION/linux/cli/palette
    chmod +x palette
  2. Use the following command to move the palette binary to the /usr/local/bin directory to make the binary available in your system $PATH. This will allow you to issue the palette command from any directory in your development environment.

    mv palette /usr/local/bin
  3. Verify that the Palette CLI is part of your system path by issuing the Palette CLI version command.

    palette version
    Palette CLI version: [version number]
  4. 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/
  5. Log in to the Palette console.

  6. Select the project you want to deploy the Edge host to and copy down the project ID. You can find the project ID at the top right side corner of the landing page below the user drop-down menu.

  7. Navigate to the left main menu and select Profiles.

  8. Click on the cluster profile you want to include in the content bundle.

  9. You can find the cluster profile ID by reviewing the URL of the current page. The cluster profile ID is the last value in the URL. Repeat this step for all the cluster profiles whose images you want to include in the content bundle.

  10. (Optional) If your cluster profile uses images or Helm charts that are hosted on private registries that require authentication, you must use the content registry-login command to authenticate with each one of the registries. Replace <registry-address>, <registry-username>, and <registry-password> with your registry credentials. Refer to the content registry-login CLI command page for more information.

    palette content registry-login --registry <registry-address> \
    --username <registry-username> \
    --password <registry-password>
  11. Issue the following command to download the images as a content bundle. Replace the placeholder values with your actual values. The bundle is generated in the <current-directory>/output/content-bundle/ folder by default. Refer to the Build Content Bundle guide for more information.

    palette content build --arch <bundle-architecture> \
    --project-id <project-id> \
    --profiles <cluster-profile-id1,cluster-profile-id2...> \
    --name <bundle-name>
  12. Use the content registry-login command again to authenticate with the external registry. Replace <registry-address>, <registry-username>, and <registry-password> with your registry credentials.

    palette content registry-login --registry <registry-address> \
    --username <registry-username> \
    --password <registry-password>
  13. Issue the following command to upload the images to the external registry. Replace <path-to-content-bundle> with the path to the content bundle you downloaded in the previous step, and <registry-address with the URL of your external registry. Refer to the content push CLI command page for a complete list of available flags.

    palette content push --file <path-to-content-bundle> --registry <registry-address>

Validate

Access your external registry and verify that all the images referenced in the cluster profile are uploaded to the external registry.