Upgrade to KAAP v0.2.0

KAAP 0.2.0 is a major release that includes a new version of the CRDs, which means you must migrate your existing v0.1.0 CRDs to v0.2.0 CRDs.

The CRDs specs are fully compatible, but it’s required to change the existing custom resource definition version to v1beta1 during upgrade.

This process ensures no downtime. One full cluster upgrade is required to complete the migration, and it’s done automatically.

To upgrade to Kaap v0.2.0, follow the steps below.

  1. Apply the new CRD versions. This process will update the CRD by adding a new version v1beta1.

    • Kubectl

    • Result

    kubectl apply -f https://github.com/datastax/kaap/releases/download/operator-0.2.0/autorecoveries.kaap.oss.datastax.com-v1-migration.yml --server-side --force-conflicts
    kubectl apply -f https://github.com/datastax/kaap/releases/download/operator-0.2.0/bastions.kaap.oss.datastax.com-v1-migration.yml --server-side --force-conflicts
    kubectl apply -f https://github.com/datastax/kaap/releases/download/operator-0.2.0/bookkeepers.kaap.oss.datastax.com-v1-migration.yml --server-side --force-conflicts
    kubectl apply -f https://github.com/datastax/kaap/releases/download/operator-0.2.0/brokers.kaap.oss.datastax.com-v1-migration.yml --server-side --force-conflicts
    kubectl apply -f https://github.com/datastax/kaap/releases/download/operator-0.2.0/functionsworkers.kaap.oss.datastax.com-v1-migration.yml --server-side --force-conflicts
    kubectl apply -f https://github.com/datastax/kaap/releases/download/operator-0.2.0/proxies.kaap.oss.datastax.com-v1-migration.yml --server-side --force-conflicts
    kubectl apply -f https://github.com/datastax/kaap/releases/download/operator-0.2.0/zookeepers.kaap.oss.datastax.com-v1-migration.yml --server-side --force-conflicts
    kubectl apply -f https://github.com/datastax/kaap/releases/download/operator-0.2.0/pulsarclusters.kaap.oss.datastax.com-v1-migration.yml --server-side --force-conflicts
    customresourcedefinition.apiextensions.k8s.io/autorecoveries.kaap.oss.datastax.com serverside-applied
    customresourcedefinition.apiextensions.k8s.io/bastions.kaap.oss.datastax.com serverside-applied
    customresourcedefinition.apiextensions.k8s.io/bookkeepers.kaap.oss.datastax.com serverside-applied
    customresourcedefinition.apiextensions.k8s.io/brokers.kaap.oss.datastax.com serverside-applied
    customresourcedefinition.apiextensions.k8s.io/functionsworkers.kaap.oss.datastax.com serverside-applied
    customresourcedefinition.apiextensions.k8s.io/proxies.kaap.oss.datastax.com serverside-applied
    customresourcedefinition.apiextensions.k8s.io/zookeepers.kaap.oss.datastax.com serverside-applied
    customresourcedefinition.apiextensions.k8s.io/autorecoveries.kaap.oss.datastax.com serverside-applied
    customresourcedefinition.apiextensions.k8s.io/bastions.kaap.oss.datastax.com serverside-applied
    customresourcedefinition.apiextensions.k8s.io/bookkeepers.kaap.oss.datastax.com serverside-applied
    customresourcedefinition.apiextensions.k8s.io/brokers.kaap.oss.datastax.com serverside-applied
    customresourcedefinition.apiextensions.k8s.io/functionsworkers.kaap.oss.datastax.com serverside-applied
    customresourcedefinition.apiextensions.k8s.io/proxies.kaap.oss.datastax.com serverside-applied
    customresourcedefinition.apiextensions.k8s.io/zookeepers.kaap.oss.datastax.com serverside-applied
  2. Copy the KAAP custom resources and move them to v1beta1.

    • Kubectl

    • Result

    namespace=default # change this according to your kaap namespace
    name=pulsar # change this according to your pulsar cluster name
    kubectl get -n $namespace autorecoveries $name-autorecovery -o yaml | sed 's/apiVersion: kaap.oss.datastax.com\/v1alpha1/apiVersion: kaap.oss.datastax.com\/v1beta1/' | kubectl apply -f -
    kubectl get -n $namespace bastions $name-bastion -o yaml | sed 's/apiVersion: kaap.oss.datastax.com\/v1alpha1/apiVersion: kaap.oss.datastax.com\/v1beta1/' | kubectl apply -f -
    kubectl get -n $namespace bookkeepers $name-bookkeeper -o yaml | sed 's/apiVersion: kaap.oss.datastax.com\/v1alpha1/apiVersion: kaap.oss.datastax.com\/v1beta1/' | kubectl apply -f -
    kubectl get -n $namespace brokers $name-broker -o yaml | sed 's/apiVersion: kaap.oss.datastax.com\/v1alpha1/apiVersion: kaap.oss.datastax.com\/v1beta1/' | kubectl apply -f -
    kubectl get -n $namespace functionsworkers $name-functionsworker -o yaml | sed 's/apiVersion: kaap.oss.datastax.com\/v1alpha1/apiVersion: kaap.oss.datastax.com\/v1beta1/' | kubectl apply -f -
    kubectl get -n $namespace proxies $name-proxy -o yaml | sed 's/apiVersion: kaap.oss.datastax.com\/v1alpha1/apiVersion: kaap.oss.datastax.com\/v1beta1/' | kubectl apply -f -
    kubectl get -n $namespace zookeepers $name-zookeeper -o yaml | sed 's/apiVersion: kaap.oss.datastax.com\/v1alpha1/apiVersion: kaap.oss.datastax.com\/v1beta1/' | kubectl apply -f -
    kubectl get -n $namespace pulsarclusters $name -o yaml | sed 's/apiVersion: kaap.oss.datastax.com\/v1alpha1/apiVersion: kaap.oss.datastax.com\/v1beta1/' | kubectl apply -f -
    autorecovery.kaap.oss.datastax.com/pulsar-autorecovery configured
    bastion.kaap.oss.datastax.com/pulsar-bastion configured
    bookkeeper.kaap.oss.datastax.com/pulsar-bookkeeper configured
    broker.kaap.oss.datastax.com/pulsar-broker configured
    functionsworker.kaap.oss.datastax.com/pulsar-functionsworker configured
    proxy.kaap.oss.datastax.com/pulsar-proxy configured
    zookeeper.kaap.oss.datastax.com/pulsar-zookeeper configured
    pulsarcluster.kaap.oss.datastax.com/pulsar configured
  3. Ensure the resources exist.

    • Kubectl

    • Result

    kubectl get -n $namespace pulsarclusters.v1beta1.kaap.oss.datastax.com $name
    NAME     AGE
    pulsar   12m
  4. Upgrade the Helm chart to version 0.2.0:

    • Kubectl

    • Result

    helm repo update
    helm pull https://datastax.github.io/kaap
    helm upgrade kaap --version 0.2.0 -n $namespace kaap/kaap-stack -f helm/examples/dev-cluster/values.yaml
    ...Successfully got an update from the "kaap" chart repository
    Update Complete. ⎈Happy Helming!⎈
    Release "pulsar" has been upgraded. Happy Helming!
    NAME: pulsar
    LAST DEPLOYED: Wed Aug 30 13:43:11 2023
    NAMESPACE: default
    STATUS: deployed
    REVISION: 2
    TEST SUITE: None
  5. Ensure everything is working correctly.

The KAAP pod should now be watching the v1beta1 resources.

You should expect each component to be restarted.

Run this command until it returns only one match:

kubectl get -n $namespace all -o yaml | grep kaap.oss.datastax.com/v1alpha1

The one match should be the ZooKeeper job, unless the broker has transactions enabled, in which case you’ll see two matches.

You’ve upgraded to KAAP v0.2.0!

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com