Skip to content

Step-by-Step Guide

Overview

This self-paced guide helps you explore the platform’s capabilities for lifecycle management of MKS clusters on the VMware vSphere environment using system templates from the template catalog.

Why Use System Templates for MKS on VMware vSphere?

System templates streamline the creation and management of MKS clusters by offering pre-configured, customizable templates. These templates:

  • Ensure consistency and reduce setup time.
  • Enable organization administrators to enforce standards while allowing teams the flexibility to customize configurations.
  • Simplify workflows, such as adding approval steps or modifying network and node pool settings.
  • Enhance collaboration and efficiency in managing Rafay Managed Kubernetes distribution on VMware vSphere environments.

Prerequisites

Before proceeding, ensure the following:

  • Access to a VMware vSphere environment.
  • Sufficient privileges to create VMs on vSphere as part of the MKS cluster lifecycle.
  • Rafay Agent deployed in your network to drive the workflow. Follow these instructions to deploy an agent. Existing agents can also be reused.
  • A Rafay API key. Follow these instructions to generate an API key for the user.

What This Template Will Do

By using this system template, the following actions will be automated:

  • Provision VMs on VMware vSphere:
  • Deploy Rafay Managed Kubernetes (MKS):

This template allows you to quickly set up a fully operational Kubernetes cluster on VMware vSphere with minimal manual intervention.


Part 1: Select and Share the System Template

This section guides you on selecting and sharing the Rafay K8s Distro on VMware vSphere system template with a project.

Step 1: Create a Project

To begin, create a logically isolated “operating environment” (sub-tenant):

  • Navigate to the Home Your Projects section.
  • Click Create a New Project and name it vmware-template for this guide.

Create Project


Step 2: Select and Share the System Template

  • As an Org Admin, navigate to Settings > Template Catalog.

Template Catalog

  • Select the Private Cloud category, where the MKS on VMware vSphere is listed.

MKS Template

  • Click Get Started.

Get Started

  • Provide the following details:
  • A unique name for the shared template(e.g., vmware-mks).
  • A version name (e.g., v1).
  • Select the project to share the template with (e.g., vmware-template).
  • Click Continue.

Project Shared

  • The platform redirects you to the selected project (vmware-template).
  • Navigate to Agents and configure the Agent required to drive the workflow.
  • Customize the input variables based on your requirements and what you want to expose to the end user.
  • In this guide, we will provide all the values for the input variables when launching the template.

Agent EM

  • Navigate back to General and Save the template as a draft or set it as an Active Version. Learn more about version management here.

Save Version


Part 2: Launch the Template to Create a MKS Cluster on VMware vSphere Environment

  • Navigate to the Environments section within the vmware-template project.
  • You will see the shared template listed.

MKS VMware vSphere Template

  • Click Launch.
  • Select the Agent. You can either add the Agent to the environment template created earlier or configure the Agent during the template launch process.
  • In this guide, the agent is configured at the environment template layer, so we will skip this part during the launch and proceed further.

  • Fill in the required configurations for the MKS cluster:

  • Rafay API Key.
  • Private and public (authorized) keys for connecting to VMs and installing the binaries.
  • General cluster settings such as the name, Kubernetes version, blueprint details, labels, etc.

General Settings

  • VMware vSphere environment configuration, including the vSphere server endpoint, vSphere user, VM template name in vCenter, datacenter name, compute cluster name, resource pool, etc., as shown below.

vSphere Configuration

  • Provide the worker and control plane VM node details as shown below.

Control Plane

CP Node Details

Worker Node

Worker Details

  • Once all the configuration is provided, click Save & Deploy.

  • Monitor the status to complete the MKS cluster provisioning.

Status

Activities

  • The MKS clusters will be displayed on the Clusters page under Infrastructure and are ready to be used for deploying workloads through the Rafay platform

Estimated Time

It will take approximately 20 to 22 minutes to provision the MKS cluster including VM's using this system template.

MKS Cluster

Part 3: Day 2 Operation on the Created MKS Cluster

Upgrading Kubernetes Version of Control Plane from 1.30 to 1.31

  • Navigate to the created cluster environment that you created above.

Navigate Environment

  • Edit the Environment.

  • Update the Cluster Kubernetes version from 1.30 to 1.31.

Update K8s Version

  • Click Save & Deploy.

  • Monitor the Status. After approximately 10 to 12 minutes, the MKS cluster will be successfully upgraded.

Update K8s Version Done

Cluster upgraded

Deleting/Destroying the MKS Cluster

  • Navigate to the cluster environment that was created above.

  • Click on Destroy and confirm by clicking Yes to proceed with the deletion.

    Destroy Action

    Destroy Action

  • The Destroy action will initiate the deletion of the environment, which includes the MKS cluster and VM's nodes associated with this environment.

    Destroy Status

  • Once the deletion process is successfully completed:

    • The VM nodes will be deleted from VMware vSphere Environment.
    • The cluster will also be removed from the Rafay platform.

Conclusion

By following these steps, you have successfully:

  • Selected and shared the MKS on VMware vSphere system template.
  • Used the template to provision an MKS cluster, including the deployment of VMs on the vSphere environment.

These system templates simplify MKS cluster management, ensure compliance with organizational standards, and provide flexibility for specific workflows.