Upgrade with KubeKey

    • You need to have a KubeSphere cluster running version 2.1.1.

    Warning

    If your KubeSphere version is v2.1.0 or earlier, please upgrade to v2.1.1 first.

    Download KubeKey using the following command:

    Download KubeKey from GitHub Release Page or use the following command directly.

    Make kk executable:

    • Make sure you read carefully.

    In v3.0.0, KubeSphere refactors many of its components such as Fluent Bit Operator and IAM. Make sure you back up any important components in case you heavily customized them but not from console.

    • Make your upgrade plan. Two upgrading scenarios are documented below.

    Upgrade KubeSphere and Kubernetes

    Upgrading steps are different for single-node clusters (all-in-one) and multi-node clusters.

    Info

    • Upgrading with Kubernetes will cause helm to be upgraded from v2 to v3. If you want to continue using helm2, please back up it: cp /usr/local/bin/helm /usr/local/bin/helm2
    • When upgrading Kubernetes, KubeKey will upgrade from one MINOR version to the next MINOR version until the target version. For example, you may see the upgrading process going from 1.16 to 1.17 and to 1.18, instead of directly jumping to 1.18 from 1.16.

    The following command upgrades your single-node cluster to KubeSphere v3.0.0 and Kubernetes v1.17.9 (default):

    1. ./kk upgrade --with-kubernetes v1.17.9 --with-kubesphere v3.0.0

    To upgrade Kubernetes to a specific version, please explicitly provide the version after the flag --with-kubernetes. Available versions are:

    • v1.15.12
    • v1.16.8, v1.16.10, v1.16.12, v1.16.13
    • v1.18.3, v1.18.5, v1.18.6

    Multi-node Cluster

    Step1: Generate a configuration file with KubeKey

    Note

    It assumes your kubeconfig is allocated in ~/.kube/config. You can change it with the flag --kubeconfig.

    Step 2: Modify the configuration file template

    Modify config-sample.yaml to fit your cluster setup. Make sure you replace the following fields correctly.

    • hosts: Input connection information among your hosts.
    • : Input etcd members.
    • controlPlaneEndpoint: Input your load balancer address (Optional).
    • registry: Input image registry information (Optional).

    Note

    Please refer to the Cluster section of config-example.yaml for more information.

    Step 3: Upgrade your cluster

    1. ./kk upgrade --with-kubernetes v1.17.9 --with-kubesphere v3.0.0 -f config-sample.yaml

    To upgrade Kubernetes to a specific version, please explicitly provide the version after the flag --with-kubernetes. Available versions are:

    • v1.15.12
    • v1.16.8, v1.16.10, v1.16.12, v1.16.13
    • v1.18.3, v1.18.5, v1.18.6