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:
Log in to the Container Cloud web UI.
On the Machines page, click the More action icon in the last column of the required machine field and select Configure machine.
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:
Log in to the Container Cloud web UI.
Download the required cluster
kubeconfig
:On the Clusters page, click the More action icon in the last column of the required cluster and select Download Kubeconfig.
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 downloadkubeconfig
again with a newly generated token.Click Download.
Export the
kubeconfig
parameters to your local machine with access to kubectl. For example:export KUBECONFIG=~/Downloads/kubeconfig-test-cluster.yml
Obtain the list of machines with the StackLight local volumes attached.
Note
In the command below, substitute
<mgmtKubeconfig>
with the path to your management clusterkubeconfig
andprojectName
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"}'
In the Container Cloud web UI, add the StackLight node label to every machine from the list obtained in the previous step.