Learn KOP - Upgrade MKS Cluster - Rafay Product Documentation

Part 3: Upgrade

In this part, you will perform an upgrade of the kubernetes version 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 the Cluster Kubernetes Version

In this step, you will upgrade the kubernetes version on the cluster.

Confirm the current kubernetes version of the cluster

The upgrade process will begin

When the upgrade process is complete, verify the current kubernetes version on the cluster

Step 1: Upgrade the Cluster Kubernetes Version

In this step, you will upgrade the kubernetes version on the cluster.

Confirm the current kubernetes version of the cluster

Download the current cluster config from the existing cluster

kubernetesVersion: v1.24.6

The updated YAML file will look like this:

apiVersion: infra.k8smgmt.io/v3
kind: Cluster
metadata:
  labels:
    check1: value1
    check2: value2
  name: mks-get-started
  project: mks
spec:
  blueprint:
    name: default
    version: 1.20.0
  config:
    autoApproveNodes: true
    dedicatedMastersEnabled: false
    highAvailability: false
    kubernetesVersion: v1.25.2
    location: sanjose-us
    network:
      cni:
        name: Calico
        version: 3.19.1
      podSubnet: 10.244.0.0/16
      serviceSubnet: 10.96.0.0/12
    nodes:
    - arch: amd64
      hostname: instance-20221129-1516
      operatingSystem: Ubuntu20.04
      privateip: 172.31.61.40
      roles:
      - Master
      - Worker
      - Storage
      ssh:
        ipAddress: 129.146.141.203
        port: "22"
        privateKeyPath: mks-get-started1.pem
        username: ubuntu
    - arch: amd64
      hostname: instance-20221129-15188
      operatingSystem: Ubuntu20.04
      privateip: 172.31.61.188
      roles:
      - Storage
      - Worker
      ssh:
        ipAddress: 152.70.157.140
        port: "22"
        privateKeyPath: mks-get-started2.pem
        username: ubuntu
  type: mks
./rctl apply -f mks-get-started-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 has been upgraded.

Recap

Congratulations! At this point, you have successfully upgraded the cluster kubernetes version.