Part 3: Upgrade
In this part, you will perform an "in-place" rolling upgrade 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:
- Upgrade the GKE control plane's Kubernetes version
- Upgrade the worker nodes kubernetes 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
- Navigate to the previously created project in your Org
- Go to Infrastructure -> Clusters and view the current version of the control plane
Confirm the current node pool version of the cluster
- Select Infrastructure -> Clusters
- Click on the cluster name on the cluster card
- Click the "Node Pools" tab
- Select Infrastructure -> Clusters
- Click on the gear icon on the cluster card, select "Upgrade Cluster"
- Select "Control Plane + Node Pools" for the Version Upgrade Type
- Select the Control Plane version to upgrade to
- Select the Worker Node version to upgrade to
- Select the node pools to be upgraded
- Click "Upgrade"
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
- Navigate to the previously created project in your Org
- Go to Infrastructure -> Clusters and view the current version of the control plane
Confirm the current node pool version of the cluster
- Select Infrastructure -> Clusters
- Click on the cluster name on the cluster card
- Click the "Nodes" tab
- Expand the node card to see the version
Download the current cluster config from the existing cluster
- Go to Infrastructure -> Clusters. Click on the settings icon of the cluster and select "Download Cluster Config"
- Update the downloaded specification file with the desired "controlPlaneVersion" for the control plane
- Update the downloaded specification file with the desired "nodeVersion" for the node pool
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 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
- Successfully upgraded the control plane version of the cluster
- Successfully upgraded the node pool version