Skip to main content

Deploy Cluster Profile Updates

Palette provides cluster profiles, which allow you to specify layers for your workloads using packs, Helm charts, Zarf packages, or cluster manifests. Packs serve as blueprints to the provisioning and deployment process, as they contain the versions of the container images that Palette will install for you. Cluster profiles provide consistency across environments during the cluster creation process, as well as when maintaining your clusters. Check out the cluster profiles section to learn more about how to create and use them. Once provisioned, there are three main ways to update your Palette deployments.

MethodDescriptionCluster application process
Cluster profile versionsCreate a new version of the cluster profile with your updates.Select the new version of the cluster profile. Apply this new profile version to the clusters you want to update.
Cluster profile updatesChange the cluster profile in place.Palette detects the difference between the provisioned resources and this profile. A pending update is available to clusters using this profile. Apply pending updates to the clusters you want to update.
Cluster overridesChange the configuration of a single deployed cluster outside its cluster profile.Save and apply the changes you've made to your cluster.

This tutorial will teach you how to update a cluster deployed with Palette to Amazon Web Services (AWS), Microsoft Azure, or Google Cloud Platform (GCP) cloud providers. You will explore each cluster update method and learn how to apply these changes using either Palette or Terraform.

Prerequisites

This tutorial builds upon the resources and steps outlined in the Deploy a Cluster tutorial for creating initial clusters. To complete it, you will need the following items.

Set Up Clusters

Follow the instructions of the Deploy a Cluster tutorial to create a cluster profile and cluster with the hello-universe application. Your cluster should be successfully provisioned and in a healthy state in the cloud of your choosing.

The cluster profile name follows the pattern [cloud provider]-profile. The cluster name follows the pattern [cloud provider]-cluster. This tutorial uses Azure for illustration purposes.

Image that shows the cluster overview of the Hello Universe Frontend Cluster

Click on the URL for port :8080 to access the Hello Universe application. The landing page is displayed and the application is functioning correctly.

Image that shows the cluster overview of the Hello Universe Frontend Cluster

Navigate to the left Main Menu and select Profiles to view the cluster profile page. Find the cluster profile corresponding to your cluster in the list of profiles. Click on the three-dot Menu and select Clone.

A dialog appears to confirm the details of the cloned cluster profile. Fill in the Name input using the pattern [cloud provider]-profile-api. Click on Confirm to create the profile.

The list of cluster profiles appears. Select the cloned cluster profile to view its details.

Select the hello-universe manifest. The editor appears. In the manifest editor, replace the existing code with the following content.

apiVersion: v1
kind: Namespace
metadata:
name: hello-universe-api
---
apiVersion: v1
kind: Service
metadata:
name: hello-universe-api-service
namespace: hello-universe-api
spec:
type: LoadBalancer
ports:
- protocol: TCP
port: 3000
targetPort: 3000
selector:
app: hello-universe-api
---
apiVersion: v1
kind: Service
metadata:
name: hello-universe-db-service
namespace: hello-universe-api
spec:
type: ClusterIP
ports:
- protocol: TCP
port: 5432
targetPort: 5432
selector:
app: hello-universe-db
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-universe-api-deployment
namespace: hello-universe-api
spec:
replicas: 1
selector:
matchLabels:
app: hello-universe-api
template:
metadata:
labels:
app: hello-universe-api
spec:
containers:
- name: hello-universe-api
image: ghcr.io/spectrocloud/hello-universe-api:1.0.9
imagePullPolicy: IfNotPresent
ports:
- containerPort: 3000
env:
- name: DB_HOST
value: "hello-universe-db-service.hello-universe-api.svc.cluster.local"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-universe-db-deployment
namespace: hello-universe-api
spec:
replicas: 1
selector:
matchLabels:
app: hello-universe-db
template:
metadata:
labels:
app: hello-universe-db
spec:
containers:
- name: hello-universe-db
image: ghcr.io/spectrocloud/hello-universe-db:1.0.0
imagePullPolicy: IfNotPresent
ports:
- containerPort: 5432

The code snippet you added deploys the hello-universe-api and hello-universe-db applications. These applications serve as the API server and database for the hello-universe application.

Click on Confirm Updates and close the editor.

Click on Save Changes to confirm your updates.

Deploy this cluster profile to a new cluster using the same steps outlined in the Deploy a Cluster tutorial.

Once you have completed these steps and the host cluster creation process has finished, navigate to the left Main Menu and select Clusters to view your deployed clusters. You should have two healthy clusters.

Image that shows the two clusters in the clusters list

Tag and Filter Clusters

Palette provides the ability to add tags to your cluster profiles and clusters. This helps you organize and categorize your clusters based on your custom criteria. You can add tags during the creation process or by editing the resource after it has been created.

Adding tags to your clusters helps you find and identify your clusters, without having to rely on cluster naming. This is especially important when operating with many clusters or multiple cloud deployments.

Navigate to the left Main Menu and select Clusters to view your deployed clusters. Find the [cloud provider]-cluster you deployed with the hello-universe application. Click on it to view its Overview tab.

Click on the Settings dropdown menu in the upper right corner and select Cluster Settings.

Fill service:hello-universe-frontend in the Tags (Optional) input box. Click on Save Changes. Close the panel.

Image that shows how to add a cluster tag

Repeat the steps above for the [cloud provider]-cluster-api cluster you deployed with the hello-universe-api. Add the service:hello-universe-backend tag to it.

Navigate to the left Main Menu and select Clusters to view your deployed clusters. Click on Add Filter, then select the Add custom filter option.

Use the drop-down boxes to fill in the values of the filter. Select Tags in the left-hand drop-down Menu. Select is in the middle drop-down Menu. Fill in service:hello-universe-frontend in the right-hand input box.

Click on Apply Filter.

Image that shows how to add a frontend service filter

Once you apply the filter, only the [cloud provider]-cluster with this tag is displayed.

Version Cluster Profiles

Palette supports the creation of multiple cluster profile versions using the same profile name. This provides you with better change visibility and control over the layers in your host clusters. Profile versions are commonly used for adding or removing layers and pack configuration updates.

The version number of a given profile must be unique and use the semantic versioning format major.minor.patch. If you do not specify a version for your cluster profile, it defaults to 1.0.0.

Navigate to the left Main Menu and select Clusters. Filter for the cluster with the service:hello-universe-backend tag. You can review how to filter your clusters in the Tag and Filter Clusters section.

Select cluster to open its Overview tab. Make a note of the IP address of the hello-universe-api-service present in this cluster. You can find it by opening the :3000 URL.

Navigate to the left Main Menu and select Profiles to view the cluster profile page. Find the cluster profile corresponding to your hello-universe-frontend cluster. It should be named using the pattern [cloud provider]-profile. Select it to view its details.

Image that shows the frontend cluster profile with cluster linked to it

The current version is displayed in the drop-down Menu next to the profile name. This profile has the default value of 1.0.0, as you did not specify another value when you created it. The cluster profile also shows the host clusters that are currently deployed with this cluster profile version.

Click on the version drop-down Menu. Select the Create new version option.

A dialog box appears. Fill in the Version input with 1.1.0. Click on Confirm.

Palette creates a new cluster profile version and opens it. The version dropdown displays the newly created 1.1.0 profile. This profile version is not deployed to any host clusters.

Image that shows cluster profile version 1.1.0

The version 1.1.0 has the same layers as the version 1.0.0 it was created from. Click on the hello-universe manifest layer. The manifest editor appears.

Replace the code in the editor with the following content.

apiVersion: v1
kind: Namespace
metadata:
name: hello-universe
---
apiVersion: v1
kind: Service
metadata:
name: hello-universe-service
namespace: hello-universe
spec:
type: LoadBalancer
ports:
- protocol: TCP
port: 8080
targetPort: 8080
selector:
app: hello-universe
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-universe-deployment
namespace: hello-universe
spec:
replicas: 2
selector:
matchLabels:
app: hello-universe
template:
metadata:
labels:
app: hello-universe
spec:
containers:
- name: hello-universe
image: ghcr.io/spectrocloud/hello-universe:1.1.0
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
env:
- name: API_URI
value: "http://REPLACE_ME:3000"

The code snippet you added deploys the hello-universe application with the extra environment variable API_URI. This environment variable allows you to specify a hostname and port for the hello-universe API server. Check out the hello-universe readme to learn more about how to expand the capabilities of the hello-universe application with an API Server.

Replace the REPLACE_ME placeholder in the code snippet provided with the IP address of the hello-universe-api-service that you made a note of earlier.

Click on Confirm Updates. The manifest editor closes.

Click on Save Changes to finish the configuration of this cluster profile version.

Navigate to the left Main Menu and select Clusters. Filter for the cluster with the service:hello-universe-frontend tag. Select it to view its Overview tab.

Select the Profile tab of this cluster. You can select a new version of your cluster profile by using the version dropdown.

Select the 1.1.0 version.

Image that shows how to select a new profile version for the cluster

Click Review & Save. Palette prompts you to preview the change summary.

Click Review changes in Editor. Palette displays the changes, with the current configuration on the left and the incoming configuration on the right. The editor shows that the API_URI variable is added to the cluster profile.

Click Apply Changes.

Palette Editor that displays changes coming from the profile version update.

warning

Palette has backup and restore capabilities available for your mission critical workloads. Ensure that you have adequate backups before you make any cluster profile version changes in your production environments. You can learn more in the Backup and Restore section.

Palette now makes the required changes to your cluster according to the specifications of the configured cluster profile version. Once your changes have completed, Palette marks your layers with the green status indicator.

Image that shows completed cluster profile updates

Click on the URL for port :8080 to access the Hello Universe application. The landing page of the application indicates that it is connected to the API server.

Image that shows hello-universe with API server

Roll back Cluster Profiles

One of the key advantages of using cluster profile versions is that they make it possible to maintain a copy of previously known working states. The ability to roll back to a previously working cluster profile in one action shortens the time to recovery in the event of an incident.

The process to roll back to a previous version is identical to the process for applying a new version.

Navigate to the left Main Menu and select Clusters. Filter for the cluster with the service:hello-universe-frontend tag. Select it to view its Overview tab.

Select the Profile tab. This cluster is currently deployed using cluster profile version 1.1.0. Select the option 1.0.0 in the version dropdown. This process is the reverse of what you have done in the previous section, Version Cluster Profiles. Click on Save to confirm your changes.

Palette now makes the changes required for the cluster to return to the state specified in version 1.0.0 of your cluster profile. Once your changes have completed, Palette marks your layers with the green status indicator.

Click on the URL for port :8080 to access the Hello Universe application. The landing page of the application indicates that the application has returned to its original state and is no longer connected to the API server.

Pending Updates

Cluster profiles can also be updated in place, without the need to create a new cluster profile version. Palette monitors the state of your clusters and notifies you when updates are available for your host clusters. You may then choose to apply your changes at a convenient time.

The previous state of the cluster profile will not be saved once it is overwritten.

Navigate to the left Main Menu and select Clusters. Filter for the cluster with the tag service:hello-universe-frontend. Select it to view its Overview tab.

Select the Profile tab. Then, select the hello-universe manifest. Change the replicas field to 1 on line 26. Click on Save. The editor closes.

This cluster now contains an override over its cluster profile. Palette uses the configuration you have just provided for the single cluster over its cluster profile and begins making the appropriate changes.

Once these changes are complete, select the Workloads tab. Then, select the hello-universe namespace.

One replica of the hello-universe-deployment is available, instead of the two specified by your cluster profile. Your override has been successfully applied.

Navigate to the left Main Menu and select Profiles to view the cluster profile page. Find the cluster profile corresponding to your hello-universe-frontend cluster. Its name follows the pattern [cloud provider]-profile.

Click on it to view its details. Select 1.0.0 in the version dropdown.

Select the hello-universe manifest. The editor appears. Change the replicas field to 3 on line 26. Click on Confirm Updates. The editor closes.

Click on Save Changes to confirm the changes you have made to your profile.

Navigate to the left Main Menu and select Clusters. Filter for the clusters with the service tag. Both of your clusters match this filter. Palette indicates that the cluster associated with the cluster profile you updated has updates available.

Image that shows the pending updates

Select this cluster to open its Overview tab. Click on Updates to begin the cluster update.

Image that shows the Updates button

A dialog appears which shows the changes made in this update. Click on Review changes in Editor. As previously, Palette displays the changes, with the current configuration on the left and the incoming configuration on the right.

Review the changes and ensure the only change is the replicas field value. You can choose to maintain your cluster override or apply the incoming cluster profile update.

Image that shows the available updates dialog

Click on Apply Changes once you have finished reviewing your changes. This removes your cluster override.

Palette updates your cluster according to cluster profile specifications. Once these changes are complete, select the Workloads tab. Then, select the hello-universe namespace.

Three replicas of the hello-universe-deployment are available. The cluster profile update is now reflected by your cluster.

Cleanup

Use the following steps to clean up the resources you created for the tutorial.

Navigate to the left Main Menu and select Clusters. Filter for the clusters with the service tag. Both of the clusters you have created for this tutorial match this filter.

Select one of the clusters to view its Overview tab.

Click on Settings to expand the menu, and select Delete Cluster.

A dialog appears. Input the cluster name to confirm the delete action.

The deletion process takes several minutes to complete. Repeat the same steps for the other cluster.

Once the clusters are deleted, navigate to the left Main Menu and click on Profiles.

Find the cluster profile you created named with the pattern [cloud provider]-profile. Click on the three-dot Menu to display the Delete button. Select Delete and confirm the selection to remove the cluster profile. Make sure you delete both versions of this profile.

Repeat the same steps to the delete the cluster profile named with the pattern [cloud provider]-profile-api.

Wrap-Up

In this tutorial, you created two clusters and cluster profiles. After the clusters deployed to your chosen cloud provider, you updated one cluster profile in through three different methods: create a new cluster profile version, update a cluster profile in place, and cluster profile overrides. After you made your changes, the Hello Universe application functioned as a three-tier application with a REST API backend server.

Cluster profiles provide consistency during the cluster creation process, as well as when maintaining your clusters. They can be versioned to keep a record of previously working cluster states, giving you visibility when updating or rolling back workloads across your environments.

To learn more about Palette, we encourage you to check out the reference resources below.