Skip to content
Open
Show file tree
Hide file tree
Changes from 7 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,122 @@
---
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**, which define the software stack and infrastructure configuration of a cluster.
- **Cluster template policies**, which define how clusters created from a template are operated, such as when upgrades
are allowed to run.

A **maintenance policy** 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.


You can complete this tutorial using either
[Palette's UI on AWS](#provision-and-upgrade-clusters-using-the-palette-ui-for-aws) or
[Terraform on AWS or Azure](#provision-and-upgrade-clusters-using-terraform), depending on how you manage your
infrastructure.

:::warning

This tutorial creates cloud resources. You will incur cloud costs until you complete the cleanup steps at the end of the
tutorial.

:::

## Prerequisites

Before you begin, make sure you have:

- A Palette account with permission to:
- Create cluster profiles
- Create cluster template policies
- Create cluster templates
- Create clusters
- Access the [Palette Community Registry](../../../registries-and-packs/registries/registries.md#default-registries)
- A cloud account registered in Palette:
- [AWS](../../../clusters/public-cloud/aws/add-aws-accounts.md) for the Palette UI workflow
- [AWS](../../../clusters/public-cloud/aws/add-aws-accounts.md) or
[Azure](../../../clusters/public-cloud/azure/azure-cloud.md) for the Terraform workflow
- Basic knowledge of [cluster profiles](../../../../../profiles/cluster-profiles/create-cluster-profiles/) and
[cluster profile variables](../../../../../profiles/cluster-profiles/create-cluster-profiles/define-profile-variables/)

If you plan to use Terraform, you also need:

- 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
Loading