Upgrade managed clusters with StackLight deployed in HA mode

Starting from Container Cloud 2.11.0, the StackLight node label is required for managed clusters deployed in HA mode. The StackLight node label allows running StackLight components on specific worker nodes with corresponding resources.

Before upgrading an existing managed cluster with StackLight deployed in HA mode to the latest Cluster release, add the StackLight node label to at least 3 worker machines. Otherwise, the cluster upgrade will fail.

To add the StackLight node label to a worker machine:

  1. Log in to the Container Cloud web UI.

  2. On the Machines page, click the More action icon in the last column of the required machine field and select Configure machine.

  3. In the window that opens, select the StackLight node label.

Caution

If your managed cluster contains more than 3 worker nodes, select from the following options:

  • If you have a small cluster, add the StackLight label to all worker nodes.

  • If you have a large cluster, identify the exact nodes that run StackLight and add the label to these specific nodes only.

Otherwise, some of the StackLight components may become inaccessible after the cluster update.

To identify the worker machines where StackLight is deployed:

  1. Log in to the Container Cloud web UI.

  2. Download the required cluster kubeconfig:

    1. On the Clusters page, click the More action icon in the last column of the required cluster and select Download Kubeconfig.

    2. Not recommended. Select Offline Token to generate an offline IAM token. Otherwise, for security reasons, the kubeconfig token expires every 30 minutes of the Container Cloud API idle time and you have to download kubeconfig again with a newly generated token.

    3. Click Download.

  3. Export the kubeconfig parameters to your local machine with access to kubectl. For example:

    export KUBECONFIG=~/Downloads/kubeconfig-test-cluster.yml
    
  4. Obtain the list of machines with the StackLight local volumes attached.

    Note

    In the command below, substitute <mgmtKubeconfig> with the path to your management cluster kubeconfig and projectName with the project name where your cluster is located.

    kubectl get persistentvolumes -o=json | \
    jq '.items[]|select(.spec.claimRef.namespace=="stacklight")|.spec.nodeAffinity.required.nodeSelectorTerms[].matchExpressions[].values[]| sub("^kaas-node-"; "")' | \
    sort -u | xargs -I {} kubectl --kubeconfig <mgmtKubeconfig> -n <projectName> get machines -o=jsonpath='{.items[?(@.metadata.annotations.kaas\.mirantis\.com/uid=="{}")].metadata.name}{"\n"}'
    
  5. In the Container Cloud web UI, add the StackLight node label to every machine from the list obtained in the previous step.