Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitleaksignore
Original file line number Diff line number Diff line change
Expand Up @@ -815,3 +815,4 @@ eb60dbd05b07dd34f27d81f36d413da34e591402:docs/docs-content/automation/crossplane
fce31b50e46a56eb11b095681f676c7a95203c5f:docs/docs-content/automation/crossplane/deploy-cluster-aws-crossplane.md:generic-api-key:253
fce31b50e46a56eb11b095681f676c7a95203c5f:docs/docs-content/automation/crossplane/deploy-cluster-gcp-crossplane.md:generic-api-key:252
fce31b50e46a56eb11b095681f676c7a95203c5f:docs/docs-content/automation/crossplane/deploy-cluster-azure-crossplane.md:generic-api-key:252
ea43e35d5748e7a3e2dcbb3011fd2ad4ac62ffe0:docs/docs-content/tutorials/clusters/cluster-templates/deploy-clusters-with-cluster-templates.md:generic-api-key:120
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Cluster Templates",
"position": 10
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
---
sidebar_position: 0
sidebar_label: "Standardize Clusters with Cluster Templates"
title: "Standardize Cluster Provisioning and Maintenance with Cluster Templates"
description:
"A tutorial that shows how to standardize cluster provisioning, apply maintenance windows, and roll out upgrades using
cluster templates and Terraform."
tags: ["cluster templates", "tutorial", "terraform", "profiles", "aws", "azure"]
---

When you manage many Kubernetes clusters, configuring and upgrading them one by one does not scale. You need a way to
apply the same configuration and upgrade rules across multiple clusters.

Palette supports this workflow with **cluster templates**. Cluster templates let you reuse a cluster configuration,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Palette supports this workflow with **cluster templates**. Cluster templates let you reuse a cluster configuration,
Palette supports this workflow with cluster templates. Cluster templates let you reuse a cluster configuration,

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use bold for UI elements.

control when upgrades happen, and apply changes to multiple clusters at once.

Cluster templates are built from two related concepts:

- [Cluster profiles](../../../../../profiles/cluster-profiles/create-cluster-profiles/), which define the software stack
and infrastructure configuration of a cluster.
- [Cluster template policies](../../../cluster-templates/create-cluster-template-policies/create-cluster-template-policies.md),
which define how clusters created from a template are operated, such as when upgrades are allowed to run.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused about the term "operated" here. Perhaps you mean managed or maintained?


A [maintenance policy](../../../cluster-templates/create-cluster-template-policies/maintenance-policy.md) is one type of
cluster template policy. Maintenance policies define a maintenance window that controls when upgrades can run.
Currently, maintenance policies are the only cluster template policy type available in Palette.

Cluster templates link cluster profiles and policies. When you create clusters from the same template, those clusters
share the same base configuration and follow the same operational rules.

In this tutorial, you will:

- Create a cluster profile
- Create a cluster template policy
- Create a cluster template that uses the profile and policy
Comment on lines +33 to +35
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we collapse these 3 lines into 1 so there is less repetition?

- Deploy two clusters (**dev** and **prod**) from the same template
- Use different
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Use different
- Use

[cluster profile variables](../../../../../profiles/cluster-profiles/create-cluster-profiles/define-profile-variables/)
to apply environment-specific settings
- Update the template and upgrade both clusters together
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Update the template and upgrade both clusters together
- Update the template and upgrade both clusters

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not really going to happen together.


Cluster templates can be used across all supported environments in Palette. This tutorial demonstrates two workflows:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Cluster templates can be used across all supported environments in Palette. This tutorial demonstrates two workflows:
Cluster templates can be used across all supported public clouds and data centers in Palette. This tutorial demonstrates two workflows:

[Palette UI on AWS](#provision-and-upgrade-clusters-using-the-palette-ui-for-aws) and
[Terraform on AWS or Azure](#provision-and-upgrade-clusters-using-terraform). Choose the workflow that fits your
preferred way of working.

## Prerequisites

- A Palette account with permission to create cluster profiles, cluster template policies, cluster templates, and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- A Palette account with permission to create cluster profiles, cluster template policies, cluster templates, and
- A Palette account with permissions to create cluster profiles, cluster template policies, cluster templates, and

clusters.
- A cloud account registered in Palette. Refer to [AWS](../../../clusters/public-cloud/aws/add-aws-accounts.md) for the
Palette UI workflow, or [AWS](../../../clusters/public-cloud/aws/add-aws-accounts.md) and
[Azure](../../../clusters/public-cloud/azure/azure-cloud.md) for the Terraform workflow.
Comment on lines +51 to +53
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, this looks like we only support AWS and Azure. You need to provide steps for AWS, Azure, GCP and VMware. Use the setup page in Getting Started. Also, you don't need to separate the cloud account prereqs between UI and TF at this point.

- Ensure that the
[Palette Community Registry](../../../registries-and-packs/registries/registries.md#default-registries) is available
in your Palette environment.

If you plan to use Terraform:

- Terraform version 1.x installed.
- A [Palette API key](../../getting-started/palette/aws/setup.md#create-a-palette-api-key) set as an environment
variable.

## Provision and Upgrade Clusters Using the Palette UI for AWS

### Import a Cluster Profile

### Create a Cluster Template Policy (Maintenance)

### Create a Cluster Template

### Deploy a Dev Cluster from the Template

### Deploy a Prod Cluster from the Template

### Validate the Deployments

### Create a New Cluster Profile Version

### Update the Cluster Template to the New Profile Version

### Upgrade Clusters

### Validate the Upgrades

### Cleanup

## Provision and Upgrade Clusters Using Terraform

### Configure the Terraform Provider

### Create a Cluster Profile

### Create a Cluster Template Policy (Maintenance)

### Create a Cluster Template

### Deploy Dev and Prod Clusters with Different Variable Values

### Validate the Deployments

### Create a New Cluster Profile Version

### Update the Cluster Template to the New Profile Version

### Upgrade Clusters

### Validate the Upgrades

### Cleanup