|
| 1 | +--- |
| 2 | +sidebar_label: "Cluster Templates" |
| 3 | +title: "Cluster Templates" |
| 4 | +description: |
| 5 | + "Learn how Palette uses cluster templates to bring consistency to clusters and manage the cluster lifecycle." |
| 6 | +hide_table_of_contents: false |
| 7 | +sidebar_position: 0 |
| 8 | +sidebar_custom_props: |
| 9 | + icon: "object-ungroup" |
| 10 | +tags: ["cluster templates", "templates", "policies"] |
| 11 | +--- |
| 12 | + |
| 13 | +:::preview |
| 14 | + |
| 15 | +::: |
| 16 | + |
| 17 | +Cluster templates are reusable blueprints that define and enforce the desired state and lifecycle of clusters deployed |
| 18 | +with Palette or [Palette VerteX](../vertex/vertex.md). |
| 19 | + |
| 20 | +Unlike [cluster profiles](../profiles/cluster-profiles/cluster-profiles.md), which define the cluster's software stack |
| 21 | +(including OS, Kubernetes distribution, network, storage, and add‑ons), cluster templates are a higher level abstraction |
| 22 | +that define the governance stack. They reference existing cluster profiles and operational |
| 23 | +[policies](./create-cluster-template-policies/create-cluster-template-policies.md), such as |
| 24 | +[maintenance policies](./create-cluster-template-policies/maintenance-policy.md), and leverage |
| 25 | +[cluster profile variables](../profiles/cluster-profiles/create-cluster-profiles/define-profile-variables/define-profile-variables.md) |
| 26 | +and [macros](../clusters/cluster-management/macros.md), allowing you to deploy, manage, and scale a synchronized fleet |
| 27 | +of clusters with minimal effort while configuring environment-specific values where needed. |
| 28 | + |
| 29 | +Cluster templates can be created at both the tenant and project scope. Cluster templates do not embed cluster profile |
| 30 | +and policy configurations but reference them as objects, allowing you to edit and replace them as needed. |
| 31 | + |
| 32 | +Cluster templates can also be managed using the [API](/api/introduction). |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | +## Cluster Profile Behavior |
| 37 | + |
| 38 | +Cluster templates link to [cluster profiles](../profiles/cluster-profiles/cluster-profiles.md) (specifically cluster |
| 39 | +profile _versions_), which remain the foundation of deploying clusters in Palette. Each cluster template must link to |
| 40 | +one [full](../profiles/cluster-profiles/create-cluster-profiles/create-full-profile.md) or |
| 41 | +[infrastructure profile](../profiles/cluster-profiles/create-cluster-profiles/create-infrastructure-profile.md) and one |
| 42 | +[maintenance policy](./create-cluster-template-policies/maintenance-policy.md). You can reference as many |
| 43 | +[add-on profiles](../profiles/cluster-profiles/create-cluster-profiles/create-addon-profile/create-addon-profile.md) as |
| 44 | +desired. Only one policy of each type can be linked per cluster template (for example, one maintenance policy per |
| 45 | +template). |
| 46 | + |
| 47 | +Once a cluster profile version is linked to a cluster template, that version of the cluster profile becomes immutable. |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | +To make changes to a linked cluster profile, you must |
| 52 | +[create a new version](../profiles/cluster-profiles/modify-cluster-profiles/version-cluster-profile.md) of the cluster |
| 53 | +profile and update the version referenced in the cluster template. This ensures that all clusters using the cluster |
| 54 | +template have identical software stacks, preventing configuration drift that can naturally occur with inline, on-the-fly |
| 55 | +updates, or by using varied cluster profile versions. Each cluster can be attached to only one cluster template at a |
| 56 | +time, further guarding against drift. |
| 57 | + |
| 58 | +A cluster profile version cannot be linked to a cluster template if that profile version is already being used by a |
| 59 | +cluster that is not attached to a cluster template. |
| 60 | + |
| 61 | +### Cluster Profile Variables |
| 62 | + |
| 63 | +Since cluster profile versions are immutable once linked to a cluster template, |
| 64 | +[cluster profile variables](../profiles/cluster-profiles/create-cluster-profiles/define-profile-variables/define-profile-variables.md) |
| 65 | +are the best way to configure environment-specific values per cluster, such as IPs, resource limits, and more. |
| 66 | + |
| 67 | +Much like deploying clusters with individual cluster profiles, variable values are assigned and propagated when you |
| 68 | +deploy a cluster using a cluster template. Once the cluster is deployed, the variables appear on the **Variable values** |
| 69 | +tab of your cluster template with an **Assignment** status of **Assigned**. |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | +Cluster templates help with the initial propagation of new variable values, but they are not the source of truth for |
| 74 | +ongoing variable management across clusters. The source of truth remains the cluster profile, which defines the schema, |
| 75 | +and the cluster itself, where values are updated in real time. |
| 76 | + |
| 77 | +To add or remove cluster profile variables, or to modify the existing schema, create a new version of your cluster |
| 78 | +profile, make the necessary changes, and update the version attached to the cluster template. |
| 79 | + |
| 80 | +For information on modifying cluster profile variables post-cluster deployment, refer to our |
| 81 | +[Modify Cluster Templates](./modify-cluster-templates.md#variable-values-tab) guide. |
| 82 | + |
| 83 | +### Cluster Profile vs. Cluster Template Deployment |
| 84 | + |
| 85 | +You can deploy clusters using cluster profiles or cluster templates, which encapsulate cluster profiles. If you plan on |
| 86 | +deploying a large number of clusters that use the same software stack and ensure the clusters update together, consider |
| 87 | +using cluster templates. |
| 88 | + |
| 89 | +The following table compares and contrasts how to update cluster profiles and cluster profile variables depending on |
| 90 | +whether your cluster is deployed using individual cluster profiles or a cluster template. |
| 91 | + |
| 92 | +| **Update Type** | **Cluster Profile Workflow** | **Cluster Template Workflow** | |
| 93 | +| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
| 94 | +| **Cluster profiles** | - Initiate updates on a per-cluster basis by selecting a [new cluster profile version](../clusters/cluster-management/cluster-updates.md#enablement) for each cluster or making on-the-fly changes to a cluster. <br / > - Routine, automatic updates are not supported. | - [Update the cluster profile version](./modify-cluster-templates.md#cluster-profiles) in the cluster template. All clusters deployed with the template are updated during the next update window specified by the [maintenance policy](./create-cluster-template-policies/maintenance-policy.md) or by [manually triggering the update](./modify-cluster-templates.md#overview-tab) for all clusters. <br /> - Updating the cluster profile version for a single cluster or making on-the-fly changes to a cluster is not supported. | |
| 95 | +| **Cluster profile variables** | - Specify initial values during cluster deployment. <br /> - Edit variable values for _individual clusters_ within [cluster settings](../profiles/cluster-profiles/create-cluster-profiles/define-profile-variables/modify-cluster-profile-variables.md#modify-profile-variable-values-in-an-active-cluster). Values are updated in real time. <br /> - To add or remove variables, or update the schema, [create a new version of the cluster profile](../profiles/cluster-profiles/modify-cluster-profiles/version-cluster-profile.md), and manually [update the version](../clusters/cluster-management/cluster-updates.md#enablement) on each cluster. Values are modified and confirmed at this step. <br /> - Batch updates for multiple clusters using the same profile are not supported. | - Specify initial values during cluster deployment. <br /> - Edit variable values for _individual clusters_ within [cluster settings](../profiles/cluster-profiles/create-cluster-profiles/define-profile-variables/modify-cluster-profile-variables.md#modify-profile-variable-values-in-an-active-cluster). Values are updated in real time. <br /> - To add or remove variables, update a schema, or update a value across _multiple clusters_, [create a new version of the cluster profile](../profiles/cluster-profiles/modify-cluster-profiles/version-cluster-profile.md), and [update the cluster profile version](./modify-cluster-templates.md#cluster-profiles) referenced in the cluster template. Next, update the [**Variable values**](modify-cluster-templates.md#variable-values-tab) for all applicable clusters. Once all values have a status of **Assigned**, all clusters deployed with the template are updated during the next update window specified by the [maintenance policy](./create-cluster-template-policies/maintenance-policy.md) or by [manually triggering the update](./modify-cluster-templates.md#overview-tab) for all clusters. | |
| 96 | + |
| 97 | +## Policy Behavior |
| 98 | + |
| 99 | +Policies are an integral part of cluster templates. While cluster profiles define the infrastructure and software stack |
| 100 | +for your clusters, cluster template policies are modular, reusable definitions that define how the cluster operates as |
| 101 | +well as its lifecycle. Policies are linked rather than embedded within cluster templates, allowing you to manage |
| 102 | +policies independently; this includes updating and swapping them as needed to create a comprehensive governance stack |
| 103 | +for your clusters. |
| 104 | + |
| 105 | +Currently, Palette supports [maintenance policies](./create-cluster-template-policies/maintenance-policy.md). Each |
| 106 | +cluster template can be linked to only one policy of each type. For example, while you can create multiple maintenance |
| 107 | +policies that you can update or swap as needed, only one can be attached to the cluster template at any time. However, |
| 108 | +the same policy can be attached to multiple cluster templates. |
| 109 | + |
| 110 | +For more information, refer to our |
| 111 | +[Create and Manage Cluster Template Policies](./create-cluster-template-policies/create-cluster-template-policies.md) |
| 112 | +guide. |
| 113 | + |
| 114 | +## Limitations |
| 115 | + |
| 116 | +- Cluster templates can be used to deploy new clusters only. Certain Day-2 operations, such as attaching a cluster |
| 117 | + template to an existing cluster and detaching clusters from cluster templates, are not supported at this time. |
| 118 | + |
| 119 | +- Rollbacks are not supported at this time. |
| 120 | + |
| 121 | +## Next Steps |
| 122 | + |
| 123 | +Before you can use cluster templates to deploy clusters, you must first create a cluster template. To create a cluster |
| 124 | +template, you must have the following resources created in Palette: |
| 125 | + |
| 126 | +- A [full](../profiles/cluster-profiles/create-cluster-profiles/create-full-profile.md) or |
| 127 | + [infrastructure cluster profile](../profiles/cluster-profiles/create-cluster-profiles/create-infrastructure-profile.md). |
| 128 | + Refer to our [Cluster Profiles](../profiles/cluster-profiles/cluster-profiles.md) guide for a general overview of |
| 129 | + cluster profiles. |
| 130 | + |
| 131 | +- A cluster template [maintenance policy](./create-cluster-template-policies/maintenance-policy.md). Refer to our |
| 132 | + [Cluster Template Policies](./create-cluster-template-policies/create-cluster-template-policies.md) guide for a |
| 133 | + general overview of cluster template policies. |
| 134 | + |
| 135 | +Once you have the following resources, refer to our [Create Cluster Templates](./create-cluster-templates.md) guide to |
| 136 | +learn how to create a cluster template and deploy clusters using cluster templates. |
0 commit comments