Document upgrade procedure for Link-based multicluster
In Linkerd 2.8.1, the multicluster addon contains a single service-mirror controller in the linkerd-multicluster namespace by default. We are moving to a model where there will be a service-mirror controller per linkerd target cluster.
We must document the steps for migrating from the old model to the new one, ideally without incurring multicluster downtime.
The following steps work for a no-downtime upgrade:
Assuming you have a source cluster, a target cluster, and some set of services which have been exported from the target cluster to the source cluster.
Step 1: Using the upgraded CLI, run the multicluster install in the source cluster. This will install some new RBAC and the Link CRD:
linkerd --context=source multicluster install | kubectl --context=source apply -f -
Step 2: Add a label to all exported service in the target cluster. This will allow the link to know that these should be exported and ensure that the mirror services remain intact during the upgrade.
For each exported svc:
kubectl --context=target label svc/foo mirror.linkerd.io/exported=true
Step 3: Establish the link. This will install a service-mirror-controller into the source cluster which is specific to this link. This means that there will be two service-mirror-controllers running in the source cluster: the old general purpose one and a new link specific one. Because we labeled the exported services in the previous step, both controllers should agree about the desired state of the mirror services and those mirror services should stay intact.
linkerd --context=target multicluster link --cluster-name=target | kubectl --context=source apply -f -
Step 4: Remove the old service-mirror-controller. Note that we keep the new link specific controller: linkerd-service-mirror-target.
kubectl --context=source -n linkerd-multicluster delete deploy/linkerd-service-mirror
Fixed by https://github.com/linkerd/website/pull/782