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 Cluster Profiles to learn more. Once provisioned, there are three main ways to update your Palette deployments.
Method | Description | Cluster application process |
---|---|---|
Cluster profile versions | Create 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 updates | Change 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 overrides | Change 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 Google Cloud Platform (GCP). You will explore each cluster update method and learn how to apply these changes using Palette. The concepts you learn about in the Getting Started section are centered around a fictional case study company, Spacetastic Ltd.
π§βπ Back at Spacetastic HQβ
The recent outages of their platform have highlighted the need to mature their systems and establish the future vision of the Spacetastic platform and infrastructure. The team have identified the following areas of improvement.
- Automated deployments across cloud providers.
- Scalable infrastructure that can support 10x the amount of current subscribers.
- Safe updates and releases without any downtime.
Wren, Founding Engineer, and Kai, Platform Engineer, have been learning and experimenting with Palette.
"The streamlined deployment process is just one part of the improvements we've got planned for our platform." says Kai. "I'm interested to learn how Palette's cluster profiles behave when applying updates and other changes to our clusters."
Wren nods, knowingly. "Yes, that's critical to avoid future outages like the incidents weβve had when rolling out new features. After all, not every service is greenfield development, so we want services that have streamlined management processes too."
Prerequisitesβ
To complete this tutorial, follow the steps described in the Set up Palette with GCP guide to authenticate Palette for use with your GCP cloud account.
Additionally, you should install Kubectl locally. Use the Kubernetes Install Tools page for further guidance.
Follow the instructions of the Deploy a Cluster tutorial to deploy a cluster with the hello-universe application. Your cluster should be successfully provisioned and in a healthy state.
The cluster profile name is gcp-profile
and the cluster name is gcp-cluster
.
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 gcp-cluster
you
deployed with the hello-universe application. Click on it to view its Overview tab.
Click on the Settings drop-down 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.
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.
Once you apply the filter, only the gcp-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 Profiles to view the cluster profile page. Find the cluster profile
corresponding to your hello-universe-frontend cluster. It should be named gcp-profile
. Select it to view its
details.
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.
The version 1.1.0 has the same layers as the version 1.0.0 it was created from.
Click on Add New Pack. Select the Public Repo registry and scroll down to the Monitoring section. Find the Kubecost pack and select it. Alternatively, you can use the search function with the pack name Kubecost.
Once selected, the pack manifest is displayed in the manifest editor.
Click on Confirm & Create. 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.
Click on Save to confirm your profile version selection.
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. The Kubecost pack will be successfully deployed.
Download the kubeconfig file for your cluster from the Palette UI. This file enables you and other users to issue kubectl commands against the host cluster.
Open a terminal window and set the environment variable KUBECONFIG
to point to the kubeconfig file you downloaded.
export KUBECONFIG=~/Downloads/admin.gcp-cluster.kubeconfig
Forward the Kubecost UI to your local network. The Kubecost dashboard is not exposed externally by default, so the command below will allow you to access it locally on port 9090. If port 9090 is already taken, you can choose a different one.
kubectl port-forward --namespace kubecost deployment/cost-analyzer-cost-analyzer 9090
Open your browser window and navigate to http://localhost:9090
. The Kubecost UI provides you with a variety of cost
visualization tools. Read more about
Navigating the Kubecost UI to make the most of
the cost analyzer.
Once you are done exploring locally, you can stop the kubectl port-forward
command by closing the terminal window it
is executing from.
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.
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 Profiles tab. Then, select the hello-universe pack. Change the replicas
field to 2
on line 15
.
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.
Two ui pods are available, instead of the one 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, named gcp-profile
.
Click on it to view its details. Select 1.0.0 in the version dropdown.
Select the hello-universe pack. The editor appears. Change the replicas
field to 3
on line 15
. 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.
Select this cluster to open its Overview tab. Click on Updates to begin the cluster update.
A dialog appears which shows the changes made in this update. Review the changes and ensure the only change is the
replicas
field value. The pending update removes your cluster override and sets the replicas
field to 3
. At this
point, you can choose to apply the pending changes or keep it by modifying the right-hand side of the dialog.
Click on Apply Changes once you have finished reviewing your changes.
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 ui pods are available. The cluster profile update is now reflected by your cluster.
Cluster Observabilityβ
As we have seen throughout this tutorial, Palette exposes a set of workload metrics out-of-the-box to help cluster administrators better understand the resource utilization of the cluster. The workload metrics in Palette are a snapshot in time and do not provide alerting capabilities.
We recommend using a dedicated monitoring system in order to gain a better picture of resource utilization in your environments. Several packs are available in the monitoring category that you can use to add additional monitoring capabilities to your cluster.
Refer to the Deploy Monitoring Stack guide to learn how to deploy a monitoring stack using the open source tool Prometheus and how to configure a host cluster to forward metrics to the monitoring stack.
Cleanupβ
Use the following steps to remove all the resources you created for the tutorial.
To remove the cluster, navigate to the left Main Menu and click on Clusters. Select the cluster you want to delete to access its details page.
Click on Settings to expand the menu, and select Delete Cluster.
You will be prompted to type in the cluster name to confirm the delete action. Type in the cluster name to proceed with the delete step. The deletion process takes several minutes to complete.
If a cluster remains in the delete phase for over 15 minutes, it becomes eligible for a force delete. To trigger a force delete, navigate to the clusterβs details page, click on Settings, then select Force Delete Cluster. Palette automatically removes clusters stuck in the cluster deletion phase for over 24 hours.
Once the cluster is deleted, navigate to the left Main Menu and click on Profiles. Find the cluster profile you created and click on the three-dot Menu to display the Delete button. Select Delete and confirm the selection to remove the cluster profile.
Wrap-Upβ
In this tutorial, you created deployed cluster profile updates. After the cluster was deployed to AWS, you updated the cluster profile 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.
We recommend that you continue to the Cluster Management with Terraform page to learn about how you can use Palette with Terraform.
π§βπ Catch up with Spacetasticβ
Wren and Kai have followed this tutorial and now have a great understanding of what cluster profile updates mean to deployed clusters. They are impressed with Palette's cluster management capabilities.
"Neat! Palette's cluster profiles allow us to review all updates we apply to our clusters." says Kai. "I can finally take my vacation days, once we can safely maintain our clusters."
"Don't I know the feeling?" laughs Wren. "I think we could all use more vacations, quiet weekends and less excitement when it comes to the Spacetastic platform."