Skip to content

Step-by-Step Guide

Overview

This self-paced guide helps you explore the platform’s capabilities for Lifecycle Management of Google GKE Clusters using GKE System Templates from the template catalog.

Why Use System Templates for GKE?

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

  • Ensure consistency and reduce setup time.
  • Enable organization administrators to enforce standards while providing 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 GKE environments.

Prerequisites

Before proceeding, ensure the following:

  • Access to a Google Cloud account.
  • Sufficient privileges to create GCP credentials for provisioning resources as part of the GKE 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.

Part 1: Select and Share the GKE System Template

This section guides you on selecting and sharing the GKE 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 gke-template for this guide.

Create Project


Step 2: Select and Share the GKE System Template

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

Template Catalog

  • Select the GCP category, where the Google Kubernetes Engine (GKE) template is listed.

GKE Template

  • Click Get Started.

Get Started

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

Project Shared

  • The platform redirects you to the selected project (gke-template).
  • Navigate to Agents and configure the Agent required to drive the workflow.

Agent EM

  • 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 GKE Cluster

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

GKE 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.

Agent

  • Fill in the required configurations for the GKE cluster:
  • Rafay API Key.
  • GCP Credentials (Service Account JSON file).
  • Additional GKE-specific settings, such as Kubernetes version, region, zone, GCP project, etc. Below are configuration screens where you can configure settings based on your environment details and requirements.

Credentials

Credentials

GKE GCP Configuration

GCP Config

Cluster Configuration

General Config

Node Pool Configuration

Node Pool Config

  • Follow the GCP GKE-related configuration form and configure it based on your requirements.
  • Click Save & Deploy.
  • Monitor the status to complete the GKE cluster provisioning.
  • Once the cluster is created, the configuration details such as cluster name, Kubernetes version, etc., will be displayed or returned in the output as shown below.

Output Results

Results

Successful Deployment

Status

Activity Logs

Activities

Cluster

  • The GKE 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 15 minutes to provision the GKE cluster using this system template.

GKE Cluster

Part 3: Day 2 Operation on the Created GKE 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.

    Edit Environment

  • Update the Control Plane Kubernetes version from 1.30 to 1.31.

    Update K8s Version

  • Click Save & Deploy.

  • Monitor the Status. After approximately 15 to 20 minutes, the GKE cluster will be successfully upgraded.

Deleting/Destroying the GKE Cluster

  • Navigate to the cluster environment that was created above.

    Navigate Environment

  • 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 GKE cluster associated with this environment.

    Destroy Status

  • Once the deletion process is successfully completed:

    • The GKE cluster will be deleted from Google Cloud.
    • The cluster will also be removed from the Rafay platform.

Conclusion

By following these steps, you have successfully:

  • Selected and shared the GKE system template.
  • Used the template to provision a GKE cluster.

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