Upgrading BEL using the lifecycle automation operator

In this guide, we’ll show you how to perform zero-downtime upgrades for BEL using its lifecycle automation capabilities.

This guide assumes that your Linkerd installation was originally installed with BEL’s lifecycle automation operator. If that’s not the case, see our migration guide.

Step 1: Upgrade your lifecycle automation operator

The latest versions of BEL sometimes requires the latest version of the lifecycle automation operator for support. Thus, our recommendation is that before upgrading BEL itself, you upgrade the operator to the latest version.

The lifecycle automation operator is a part of the Buoyant Extension, and you can see the exact set of BEL versions installable by each version of the Buoyant Extension.

Start by updating the Buoyant Extension:

helm repo add linkerd-buoyant https://helm.buoyant.cloud
helm repo update
helm upgrade linkerd-buoyant \
  --namespace linkerd-buoyant \
  --reuse-values \
  linkerd-buoyant/linkerd-buoyant

Step 2: Update the control plane CRD

With the latest lifecycle automation operator installed, we are ready to upgrade BEL itself. At this point, it’s simply a matter of changing the version of BEL specified in the ControlPlane resource.

Typically this would be done by a gitops workflow using a tool such as Argo or Flux. However, it can also be done directly on the cluster, e.g. by running:

kubectl edit controlplane/linkerd-control-plane

The ControlPlane resource contains a version key (see the full reference guide) that looks like this:

apiVersion: linkerd.buoyant.io/v1alpha1
kind: ControlPlane
metadata:
  name: linkerd-control-plane
spec:
  components:
    linkerd:
      version: enterprise-2.17.0
      controlPlaneConfig:
        license: ...
...

Set the version key in this resource to the desired BEL version (e.g. enterprise-2.17.0), and BEL’s lifecycle automation operator will take care of the rest. It will first upgrade the Linkerd core control plane, and once that successfully completes, the data plane operator will restart each workload selected by the DataPlane resources, so that the pods will pick up a new version of the Linkerd proxy.

Step 3: Verifying the lifecycle automation operator status

The lifecycle automation operator will typically take several minutes to complete an upgrade. You can monitor its progress by getting its Kubernetes status:

kubectl get controlplane

You should see output similar to this:

NAME                    STATUS     DESIRED             CURRENT             AGE
linkerd-control-plane   Pending    enterprise-2.17.0   enterprise-2.16.0        116s

Once the control plane moved from Pending to UpToDate, you can check the status of the data plane:

kubectl get dataplane -A
NAMESPACE         NAME        STATUS     DESIRED   CURRENT   AGE
emojivoto         dataplane   UpToDate   4         4         4s
linkerd-buoyant   dataplane   UpToDate   3         3         4s