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 customize the cluster infrastructure stack, allowing you to choose the desired Operating System (OS), Kubernetes, Container Network Interfaces (CNI), Container Storage Interfaces (CSI). You can further customize the stack with 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 using Amazon Web Services (AWS), Microsoft Azure, or Google Cloud Platform (GCP) cloud providers. 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 customized applications to Kubernetes with minimal effort.

Architecture

As you navigate the tutorial, refer to this diagram to help you understand how Palette uses a cluster profile as a blueprint for the host cluster you deploy. Palette clusters have the same node pools you may be familiar with: control plane nodes, often called master nodes, and worker nodes where you will deploy applications. The result is a host cluster that Palette manages.

A view of Palette managing the Kubernetes lifecycle


Deploy the Cluster and the Application

Select the tab for 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.

Deploy the Environment

The following steps will guide you through deploying the cluster infrastructure. You will start by creating a cluster profile that you apply to the host cluster.


Create Cluster Profile (AWS)

Cluster profiles are templates you create with the following core layers and any add-on layers such as security, monitoring, logging, and more.

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

You customize profiles by choosing the type of component and version. In this way, profiles 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.

View of the cluster Profiles 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 each layer, click on Next to proceed to the next 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.

You can modify cluster profiles after you create them by adding, removing, or editing the layers.


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

A list is displayed of available profiles you can choose to deploy to AWS. Select the cluster profile you created earlier and click on Next.


Parameters

The Parameters section displays 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 needed. Click on Next to proceed.


Cluster Configuration

The Cluster config section allows you to select the Region in which to deploy the host cluster and specify other options such as 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, review the following parameters.

  • Number of nodes in the pool - This option sets the number of master or worker nodes in the master or worker pool. For this tutorial, set the count to one for the master pool and two for the worker pool.
  • Allow worker capability - This option allows the master node to also 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 in which the node pool can place nodes. Select an 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 allows you to review the cluster configuration prior to deploying the cluster. Review all the settings and click on Finish Configuration to deploy the cluster.

Configuration overview of newly created AWS cluster


Navigate to the left Main Menu and select Clusters.

Update the cluster

Click on your cluster to review its 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 process can take 15 to 30 min. The deployment time varies depending on the cloud provider, cluster profile, cluster size, and the node pool configurations provided. You can learn more about the deployment progress by reviewing the event log. Click on the Events tab to view the 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

In the following steps, you will learn how to update a cluster profile by adding a new layer to it that contains the application.


Add a Manifest

Navigate to the left Main Menu and select Profiles. Select the cluster profile you created earlier and which you 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 be displayed on the right side of the screen.

Screenshot of unopened manifest editor


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.

Screenshot of manifest in the editor

The manifest defines 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.


Deployment

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 blue button Updates Available. Click on the button to review the available updates.

The cluster details page with a view of pending 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. When the application is deployed and ready for network traffic, indicated in the Services field, Palette exposes the service URL. Click on the URL for port :8080 to access the Hello Universe application.

Cluster details page with service URL highlighted


It can take up 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.


Deployed application landing page with counter displayed


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

Click on Settings to expand the menu, and select Delete Cluster.

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 a cluster profile, which is a template that contains the core layers required to deploy a host cluster. You then deployed a host cluster onto your preferred cloud service provider. After the cluster deployed, you updated the profile by adding the Hello Universe application 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.