Skip to content

Upgrading k0rdent#

Important

In some circumstances, upgrades involve additional manual steps. Be sure to check the additional instructions for upgrading to k0rdent 0.2.0 or 0.3.0.

Upgrading k0rdent involves making upgrades to the Management object. To do that, you must have the Global Admin role. (For detailed information about k0rdent RBAC roles and permissions, refer to the RBAC documentation.) Follow these steps to upgrade k0rdent:

  1. Create a new Release object

    Start by creating a Release object in the management cluster that points to the desired version. You can see available versions at https://github.com/k0rdent/kcm/releases. The actual Release object includes information on the templates and resources that are available, as well as the version of the Kubernetes Cluster API. For example, the v1.0.0-rc1 Release object looks like this:

    apiVersion: k0rdent.mirantis.com/v1alpha1
    kind: Release
    metadata:
      name: kcm-1-0-0-rc1
      annotations:
        helm.sh/resource-policy: keep
    spec:
      version: 1.0.0-rc1
      kcm:
        template: kcm-1-0-0-rc1
      capi:
        template: cluster-api-0-3-0
      providers:
        - name: cluster-api-provider-k0sproject-k0smotron
          template: cluster-api-provider-k0sproject-k0smotron-0-3-0
        - name: cluster-api-provider-azure
          template: cluster-api-provider-azure-0-3-2
        - name: cluster-api-provider-vsphere
          template: cluster-api-provider-vsphere-0-3-1
        - name: cluster-api-provider-aws
          template: cluster-api-provider-aws-0-3-0
        - name: cluster-api-provider-openstack
          template: cluster-api-provider-openstack-0-3-2
        - name: cluster-api-provider-docker
          template: cluster-api-provider-docker-0-3-0
        - name: cluster-api-provider-gcp
          template: cluster-api-provider-gcp-0-3-0
        - name: cluster-api-provider-ipam
          template: cluster-api-provider-ipam-0-3-0
        - name: cluster-api-provider-infoblox
          template: cluster-api-provider-infoblox-0-3-0                    
        - name: projectsveltos
          template: projectsveltos-0-54-4
    

    Thankfully, you don't have to build these YAML files yourself. Once you've chosen a release, you can go ahead and create the release object by referencing the YAML file online, as in:

    VERSION=v1.0.0-rc1
    kubectl create -f https://github.com/k0rdent/kcm/releases/download/${VERSION}/release.yaml
    
    release.k0rdent.mirantis.com/kcm-1-0-0-rc1 created
    

  2. List Available Releases

    Once you've created the new Release you need to update the Management object to use it. Start by viewing all available Releases:

    kubectl get releases
    
    NAME        AGE
    kcm-0-2-0   6d9h
    kcm-1-0-0-rc1   12m
    
  3. Patch the Management object with the new Release

    Update the spec.release field in the Management object to point to the new release. Replace <release-name> with the name of your desired release:

    RELEASE_NAME=kcm-1-0-0-rc1
    kubectl patch managements.k0rdent.mirantis.com kcm --patch "{\"spec\":{\"release\":\"${RELEASE_NAME}\"}}" --type=merge
    
  4. Verify the Upgrade

    Although the change will be made immediately, it will take some time for k0rdent to update the components it should be using. Monitor the readiness of the Management object to ensure the upgrade was successful. For example:

    kubectl get managements.k0rdent.mirantis.com kcm
    
    NAME   READY   RELEASE     AGE
    kcm    True    kcm-1-0-0-rc1   4m34s