Overview

This doc contains instructions on upgrading your VMware Tanzu RabbitMQ for Kubernetes deployments to a new version.

Note: if you are upgrading from any version 1.1.* to 1.2.0, you must follow the specific instructions for that upgrade path. In future versions you may follow the below instructions.

Prerequisite

This guide assumes you have the following:

  • A running Kubernetes cluster
  • Kubernetes CLI tools such as kubectl installed
  • The Carvel toolchain installed locally

Upgrade

The procedure to upgrade your Tanzu RabbitMQ Package consists of the following steps:

  • Upgrade RabbitMQ operators
  • Upgrade RabbitMQ instances

Upgrade RabbitMQ operators

To upgrade the operators, you must first update the PackageRepository for Tanzu RabbitMQ:

kubectl edit packagerepository tanzu-rabbitmq-repo
apiVersion: packaging.carvel.dev/v1alpha1
kind: PackageRepository
metadata:
   name: tanzu-rabbitmq-repo
spec:
   fetch:
      imgpkgBundle:
         image: registry.tanzu.vmware.com/p-rabbitmq-for-kubernetes/tanzu-rabbitmq-package-repo:${NEW_VERSION} # Replace with new release version

After this is installed, verify that the expected new versions are visible to your client:

$ kubectl get packages
NAME                                      PACKAGEMETADATA NAME        VERSION           AGE
rabbitmq.tanzu.vmware.com.<NEW VERSION>   rabbitmq.tanzu.vmware.com   <NEW VERSION>     7s
rabbitmq.tanzu.vmware.com.1.2.0           rabbitmq.tanzu.vmware.com   1.2.0             7s

Next, update the PackageInstall for the Tanzu RabbitMQ operators:

kubectl edit packageinstall tanzu-rabbitmq
apiVersion: packaging.carvel.dev/v1alpha1
kind: PackageInstall
metadata:
   name: tanzu-rabbitmq
spec:
   serviceAccountName: ${SERVICE_ACCOUNT} # Replace with service account name
   packageRef:
      refName: rabbitmq.tanzu.vmware.com
      versionSelection:
         constraints: ${NEW_VERSION} # Replace with release version

Once the command finishes, run kapp inspect -a tanzu-rabbitmq-ctrl to verify everything is running and all conditions (Conds column) are true. It should look similar to this:

# [...]
# rabbitmq-system  messaging-topology-leader-election-role         Role                            kapp     -       ok  -   9d
# ^                messaging-topology-leader-election-rolebinding  RoleBinding                     kapp     -       ok  -   9d
# ^                messaging-topology-operator                     Deployment                      kapp     2/2 t   ok  -   11s
# ^                messaging-topology-operator                     ServiceAccount                  kapp     -       ok  -   9d
# ^                messaging-topology-operator-59c887bf9b          ReplicaSet                      cluster  -       ok  -   11s
# ^                messaging-topology-operator-59c887bf9b-24z29    Pod                             cluster  4/4 t   ok  -   11s
# ^                rabbitmq-cluster-leader-election-role           Role                            kapp     -       ok  -   9d
# ^                rabbitmq-cluster-leader-election-rolebinding    RoleBinding                     kapp     -       ok  -   9d
# ^                rabbitmq-cluster-operator                       Deployment                      kapp     2/2 t   ok  -   11s
# ^                rabbitmq-cluster-operator                       ServiceAccount                  kapp     -       ok  -   9d
# ^                rabbitmq-cluster-operator-5c479456b             ReplicaSet                      cluster  -       ok  -   11s
# ^                rabbitmq-cluster-operator-5c479456b-lwsxf       Pod                             cluster  4/4 t   ok  -   11s
# [...]

At this point, the upgrade of the Operators is completed.

Procedure to upgrade RabbitMQ instances

The following procedure documents how to upgrade individual RabbitMQ instances. Please note that this procedure will restart RabbitMQ in a rolling strategy; in other words, it will restart one RabbitMQ Pod at a time.

  1. Use the following command to open the manifest for each RabbitmqCluster you wish to upgrade:
    kubectl edit rmq my-tanzu-rabbit
    # Replace 'my-tanzu-rabbit' with the name of your RabbitMQ cluster
    
  2. Remove the line containing image: in the spec and save & exit the file:
    [...]
    spec:
      image: dev.registry.pivotal.io/rabbitmq/vmware-tanzu-rabbitmq:1.2.0 # Remove this line
    [...]
    

This will reset the image of the RabbitmqCluster to the default of the operator, which will be the uplevel version of Tanzu RabbitMQ. This will trigger the rolling upgrade of your cluster.

check-circle-line exclamation-circle-line close-line
Scroll to top icon