Learn KOP - Upgrade GKE Cluster - Rafay Product Documentation

Part 3: Upgrade

In this part, you will perform an "in-place" rolling upgrade of the control plane and worker nodes to a more recent Kubernetes version using the web console or the RCTL CLI.


What Will You Do

In this part, you will:


Step 1: Upgrade Control Plane and Node Pools

In this step, you will upgrade the Kubernetes version for the control plane and the node pools.

Confirm the current control plane version of the cluster

Confirm the current node pool version of the cluster

Upgrade the Control Plane and Node Pools

The upgrade process will begin.

When the upgrade process is complete, verify the current control plane version.

Verify the current node pool version.


Step 1: Upgrade Control Plane and Node Pools

In this step, you will upgrade the Kubernetes version for the control plane and the node pools.

Confirm the current control plane version of the cluster

Confirm the current node pool version of the cluster

Download the current cluster config from the existing cluster

controlPlaneVersion: "1.23"
nodeVersion: "1.23"

The updated YAML file will look like this:

apiVersion: infra.k8smgmt.io/v2
kind: Cluster
metadata:
    labels:
        rafay.dev/clusterName: gke-get-started-cluster
        rafay.dev/clusterType: gke
    name: gke-get-started-cluster
    project: gke
spec:
    blueprint:
        name: default-gke
        version: latest
    cloudCredentials: GCP-CC
    config:
        controlPlaneVersion: "1.23"
        location:
            defaultNodeLocations:
                - us-west1-c
            type: zonal
            zone: us-west1-c
        name: gke-get-started-cluster
        network:
            enableVPCNativeTraffic: true
            maxPodsPerNode: 110
            name: default
            networkAccess:
                privacy: public
            nodeSubnetName: default
        nodePools:
            - machineConfig:
                bootDiskSize: 100
                bootDiskType: pd-standard
                imageType: COS_CONTAINERD
                machineType: e2-standard-4
              name: default-nodepool
              nodeVersion: "1.23"
              size: 1
        project: demos-249423
    type: Gke

Execute the command to begin the upgrade

Execute the following command to begin the upgrade of the control plane and node pool. Note, update the file name in the below command with the name of your updated specification file.

./rctl apply -f gke-get-started-cluster-config.yaml

From the web console, you can see that the upgrade is in progress. Note that the upgrade can take up to 15 minutes to complete.

Once the upgrade is complete, you can see that the Kubernetes version of the cluster control plane has been upgraded.

You can see that the Kubernetes version of the node pool has been upgraded as well.


Recap

Congratulations! At this point, you have