Deploy a Cluster

Palette helps you create and manage Kubernetes clusters in various cloud environments with minimal overhead.

Palette offers profile-based management for Kubernetes, enabling consistency, repeatability, and operational efficiency across multiple clusters. A cluster profile allows you to define the cluster infrastructure stack you prefer in a declarative and reusable manner. It allows you to define customizable infrastructure stacks using desired Operating System (OS), Kubernetes, Container Network Interfaces (CNI), Container Storage Interfaces (CSI), and additional add-on application layers.

After defining a cluster profile, you can provide the cloud environment details, the control plane, and worker node configurations to deploy a host cluster.

This tutorial will teach you how to deploy a host cluster with Palette by using the following public cloud providers - Amazon Web Services (AWS), Microsoft Azure, or Google Cloud Platform (GCP). You can deploy a cluster using either Palette or Terraform. You will learn about Cluster Mode and Cluster Profiles and how these components enable you to deploy applications to Kubernetes quickly with minimal effort but with high customization.

Architecture

As you navigate through the tutorial, use this diagram as a reference point when trying to understand how a cluster profile is used when deploying a host cluster. Palette uses the cluster profile as a blueprint when deploying the cluster. Clusters deployed by Palette have the same node pools you may be familiar with, control plane nodes, often called master nodes and the worker nodes where you will deploy applications. The result is a host cluster managed by Palette.

A view of Palette managing the Kubernetes lifecycle


Deploy the Cluster and the Application

Select the tab representing the workflow you want to learn more about.


You can create and manage clusters directly from the Palette dashboard. Use the following steps to learn how to deploy a host cluster to multiple cloud providers.

Prerequisites

To complete this tutorial, you will need the following items

Deploy the Environment

The following steps will guide you through deploying the cluster infrastructure. You will start by creating a cluster profile and deploying the host cluster using your cluster profile.


Create Cluster Profile (AWS)

Cluster profiles are templates created with the following core layers.

  • Operating System (OS).
  • Kubernetes distribution.
  • Network Container Interface (CNI).
  • Storage Container Interface (CSI).

A cluster profile contains these core layers and additional add-on layers, such as security, monitoring, logging, etc.

Cluster profiles enable you to create infrastructure stacks that can be customized in terms of the number of layers, type of components, and version and offer a reproducible way to create clusters.

Log in to Palette and navigate to the left Main Menu. Select Profiles to view the cluster profile page. You can view the list of available cluster profiles. To create a cluster profile, click the Add Cluster Profile button at the top right.

View of the cluster view page

Follow the wizard to create a new profile.

In the Basic Information section, assign the name aws-profile, a brief profile description, select the type as Full, and assign the tag env:aws. You can leave the version empty if you want to. Just be aware that the version defaults to 1.0.0. Click on Next.

Cloud Type allows you to choose the infrastructure provider with which this cluster profile is associated. Select AWS and click on Next.

Profile Layers, this is the main configuration step where you specify the packs that compose the profile. There are four required infrastructure packs and several optional add-on packs you can choose from. Every pack requires you to select the Pack Type, Registry, and Pack Name.

For this tutorial, use the following packs:

Pack NameVersionLayer
ubuntu-aws LTS20.4.xOperating System
Kubernetes1.24.xKubernetes
cni-calico3.24.xNetwork
csi-aws-ebs1.16.xStorage

As you fill out the information for a layer, click on Next to proceed to the following layer.

Click on Confirm after you have completed filling out all the core layers.

A view of the cluster profile stack

The review section gives an overview of the cluster profile configuration you selected. Click on Finish Configuration to create the cluster profile.

Cluster profiles are mutable, meaning you can modify them when you desire. You can add, remove, or edit the existing layers during modification.


Create a New Cluster

Navigate to the left Main Menu and select Cluster. From the clusters page, click on the Add New Cluster button.

palette clusters overview page

Palette will prompt you to either deploy a new cluster or import an existing one. Click on Deploy New Cluster to access the cluster deployment wizard. Select AWS and click the Start AWS Configuration button. Use the following steps to create a host cluster in AWS.


Basic information

In the Basic information section, insert the general information about the cluster, such as the Cluster name, Description, Tags, and Cloud account. Click on Next.

palette clusters basic information


Cluster Profile

On the right side, there is a list of available cluster profiles you can choose to deploy to AWS. Select the cluster profile you created earlier and click on Next.


Parameters

The Parameters section displays all the core and add-on layers in the cluster profile.

palette clusters parameters

Each layer has a pack manifest file with the deploy configurations. The pack manifest file is in a YAML format. Each pack contains a set of default values. You can change the manifest values if you don't want to use the default values of the cluster profile. Click on Next to proceed.


Cluster Configuration

The Cluster config section allows you to select the Region of where to deploy the host cluster and other options such as FIPS and specifying the SSH Key Pair to assign to the cluster. All clusters require you to select an SSH key. After you have selected the Region and your SSH Key Pair Name, click on Next.

Nodes Configuration

The Nodes config section allows you to configure the nodes that make up the control plane (master nodes) and data plane (worker nodes) of the host cluster.

Before you proceed to next section, take the time to review the following parameters.

  • Number of nodes in the pool - Used to set the right amount of nodes that make up the pool of either the master or worker nodes. Set the count to one for the master pool and two for the worker pool.
  • Allow worker capability - This option allows the master node also to accept workloads. This is useful when spot instances are used as worker nodes. You can check this box if you want to.
  • Instance Type - Select the compute type for the node pool. Each instance type displays the amount of CPU, RAM, and hourly cost of the instance. Select m4.2xlarge.
  • Availability zones - Used to specify the availability zones the node pool can place nodes. Pick one availability zone.
  • Disk size - Set the disk size to 60 GiB.

palette clusters basic information

Select Next to proceed with the cluster deployment.


Settings

In the Settings section, you can configure advanced options such as when to patch the OS, enable security scans, manage backups, add role-based access control (RBAC) bindings, and more.

For this tutorial, you can use the default settings. Click on Validate to continue.


Review

The Review section is an opportunity for you to review all the cluster configurations prior to deploying the cluster. Review all the settings and click on Finish Configuration to deploy the cluster.

aws creation of a new cluster overview page


Navigate to the left Main Menu and select Clusters.

Update the cluster

Click on your cluster to review details such as deployment status, event logs, cluster profile, monitoring data, and other information about the cluster.


A view of the cluster details page

The cluster deployment may take several minutes depending on the cloud provider, node count, node sizes used, and the cluster profile. You can learn more about the deployment progress by reviewing the event log. Click on the Events tab to check the event log.

Update the cluster


While you wait for the cluster deployment process to complete, feel free to check out a video where we discuss the growing pains of using Kubernetes and how Palette can help your address these pain points.



Update Cluster Profile

Once the cluster is deployed and ready you are ready for the next steps. In the following steps, you will learn how to update cluster profiles after deploying a host cluster. In this scenario, you will add a new layer to the cluster profile that contains the application.


Add a Manifest

Navigate to the left Main Menu and select Profiles. Select the cluster profile you created earlier and applied to the host cluster.

Click on Add Manifest at the top of the page and fill out the following input fields.

  • Layer name - The name of the layer. Assign the name application.
  • Manifests - Add your manifest by giving it a name and clicking the New Manifest button. Assign a name to the internal manifest and click on the blue button An empty editor will appear on the right side of the screen.

Image of the blue button


In the manifest editor, insert the following content.


apiVersion: v1
kind: Service
metadata:
name: hello-universe-service
spec:
type: LoadBalancer
ports:
- protocol: TCP
port: 8080
targetPort: 8080
selector:
app: hello-universe
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-universe-deployment
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.0.11
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080

The code snippet you added will deploy the hello-universe application. You may have noticed that the code snippet you added is a Kubernetes configuration. Manifest files are a method you can use to achieve more granular customization of your Kubernetes cluster. You can add any valid Kubernetes configuration to a manifest file.

manifest

The manifest defined a replica set for the application to simulate a distributed environment with a web application deployed to Kubernetes. The application is assigned a load balancer. Using a load balancer, you can expose a single access point and distribute the workload to both containers.

Click on Confirm & Create to save your changes.


Deploy

Navigate to the left Main Menu and select Clusters. Click on the host cluster you deployed to open its details page.

On the top right-hand corner is a green button Updates Available. Click on the button to review the available updates. Compare the new changes against the previous cluster profile definition. The only difference is the addition of a manifest that will deploy the Hello Universe application.

Available updates details

Click on Confirm updates to apply the updates to the host cluster. Depending on the scope of the change this may take a few moments.


Verify the Application

Navigate to the cluster's details page and verify you are in the Overview tab. Once the application is deployed and ready for network traffic, in the Services row, Palette will expose the service URL. Click on the URL for port :8080 to access the Hello Universe application.

Deployed application


It takes between one to three minutes for DNS to properly resolve the public load balancer URL. We recommend waiting a few moments before clicking on the service URL to prevent the browser from caching an unresolved DNS request.


Welcome to Hello Universe, a demo application to help you learn more about Palette and its features. Feel free to click on the logo to increase the counter and for a fun image change.

You have deployed your first application to a cluster managed by Palette. Your first application is a single container application with no upstream dependencies.

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 to access the clusters page. Select the cluster you want to delete to access its details page.

Click on Settings. In the top-right-hand corner of the page, expand the settings Menu and select Delete Cluster to delete the cluster.

Destroy-cluster

You will be asked 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 will take several minutes to complete.


If a cluster remains in the delete phase for over 15 minutes, it becomes eligible for Force Delete. To trigger a force delete, navigate to the respective cluster’s details page and click on Settings. Click on the Force Delete Cluster to delete the cluster. Palette will automatically remove 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 a cluster profile, which is a template containing the core layers required to deploy a host cluster. You then deployed a host cluster onto your preferred cloud service provider. Once the cluster deployed, you updated the cluster profile and added the application Hello Universe to the profile definition, and applied the updates to the host cluster.

Palette assures consistency across cluster deployments through cluster profiles. Palette also enables you to quickly deploy applications to a Kubernetes environment with little or no prior Kubernetes knowledge. In a matter of minutes, you were able to provision a new Kubernetes cluster and deploy an application.

We encourage you to check out the Deploy an Application using Palette Dev Engine tutorial to learn more about Palette. Palette Dev Engine can help you deploy applications more quickly through the usage of virtual clusters. Feel free to check out the reference links below to learn more about Palette.