Skip to content

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:

  • Upgrade the cluster Kubernetes version

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

  • Navigate to the previously created project in your Org
  • Go to Infrastructure -> Clusters and view the current kubernetes version

Verify Control Plane Version

  • Click on the gear icon on the cluster card, select "Upgrade K8s Version"
  • Select the version to upgrade to
  • Click "Upgrade"

Web Upgrade

The upgrade process will begin

Web Upgrade

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

Web Upgrade


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

  • Navigate to the previously created project in your Org
  • Go to Infrastructure -> Clusters and view the current Kubernetes Version

Verify Control Plane 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 "kubernetesVersion" for the 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
  • Execute the following command to begin the kubernetes version upgrade. Note, update the file name in the below command with the name of your updated specification file
./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.

Cluster Upgrade

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

Verify Cluster Version


Recap

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