Learn KOP - Provision GKE Cluster - Rafay Product Documentation

Part 1: Provision

In this exercise, you will focus on provisioning a GKE cluster in Google Cloud using the web console or the RCTL CLI.


What Will You Do

In this part, you will:


Step 1: Create Project

In this step, we will create a new project which will serve as a logically isolated "operating environment" (sub tenant).

Note: Creating a project requires " Org Admin" privileges.


Step 2: Create Cloud Credential

Cloud credentials provide the controller with privileges to programmatically interact with your Google Cloud account so that it can manage the lifecycle of infrastructure associated with GKE clusters.


Step 3: Configure & Provision Cluster

In this step, you will configure and customize your GCP GKE Cluster using either the web console or the RCTL CLI with a YAML based cluster specification.

Web ConsoleRCTL

Provisioning will take approximately 15 minutes to complete. The final step in the process is the blueprint sync for the default blueprint. This can take a few minutes to complete because this requires the download of several container images and deployment of monitoring and log aggregation components.

apiVersion: infra.k8smgmt.io/v3
kind: Cluster
metadata:
  # The name of the cluster
  name: gke-get-started-cluster
  # The name of the project the cluster will be created in
  project: gke
spec:
  blueprint:
  # The name of the blueprint the cluster will use
    name: minimal
  # The version of the blueprint to be used
    version: latest
  # The name of the cloud credential that will be used to create the cluster
  cloudCredentials: GCP-CC
  config:
    # The kubernetes version of the control plane
    controlPlaneVersion: "1.29"
    features:
    # Enable the compute engine persistent disk driver, required for K8s version 1.25+
      enableComputeEnginePersistentDiskCSIDriver: true
  # The GCP project ID where the cluster resides
    gcpProject: demos-249423
    location:
      config:
    # The GCP geo-location where the cluster resides
        zone: us-west1-c
      type: zonal
    network:
      access:
        config: null
        type: public
      enableVPCNativetraffic: true
    # The maximum number of pods that can run on a node
      maxPodsPerNode: 110
      name: default
      subnetName: default
    nodePools:
    - machineConfig:
      # The size of the boot disk in GB on each node in the node pool
        bootDiskSize: 100
    # The type of disk used for the boot disk
        bootDiskType: pd-standard
    # The operating system used on the nodes
        imageType: COS_CONTAINERD
    # The size of the VMs that the nodes will run on
        machineType: e2-standard-4
    # The name of the  node pool
      name: default-nodepool
    # The kubernetes version that will run on the node pool
      nodeVersion: "1.28"
    # The desired number of nodes that can run in the node pool
      size: 3
  type: gke
      metadata:
        name: gke-get-started-cluster
        project: gke
      cloudCredentials: GCP-CC
      controlPlaneVersion: "1.29"
      defaultNodeLocations:
    - us-west1-c
    type: zonal
    zone: us-west1-c
      name: gke-get-started-cluster
      nodeVersion: "1.28"
      project: demos-249423
./rctl apply -f gke-cluster-basic.yaml

Provisioning the infrastructure will take approximately 15 minutes to complete. The final step in the process is the blueprint sync for the default blueprint's add-ons. This can take a few minutes to complete because this requires the download and deployment of several container images associated add-ons.

Once the cluster finishes provisioning, download the cluster configuration file and compare it to the specification file used to create the cluster. The two files will match.


Step 4: Verify Cluster

Once provisioning is complete, you should have a ready to use GCP GKE Cluster. We will verify the cluster by checking its health and status.


Step 4a: Cluster Status & Health

The Kubernetes management operator automatically deployed on the cluster by the controller will "maintain a heartbeat" with the controller and will "proactively monitor" the status of the components on the worker node required for communication with the control plane and the controller.


Step 4b : Zero Trust Kubectl

The controller provides a zero trust kubectl channel for authorized users.


Step 5: Dashboards

The default cluster blueprint automatically deploys Prometheus and related components required to monitor the GKE cluster. This data is aggregated from the cluster on the controller in a time series database. This data is then made available to administrators in the form of detailed dashboards.

Step 5a: Cluster Dashboard

Click on the cluster name to view the cluster dashboard. You will be presented with time series data for the following


Step 5b: Node Dashboard

Click on the node tab and then select a node to view the node dashboard.


Step 5c: Kubernetes Resources

The dashboard also comes with an integrated Kubernetes dashboard.


Recap

Congratulations! At this point, you have