Skip to main content


With Stork 2.4.3 and newer, you can back up and restore customer-specific CRDs. Using this method, you create a Stork custom resource, called an ApplicationRegistration, which registers your CRD with Stork, allowing you to perform a migration, backup, and restore of your CRDs specified resources.


  • Your Portworx installation must contain the libopenstorage/stork:2.4.3 image.

Fetch default ApplicationRegistrations

By default, Stork supports a number of customer-specific CRDs. List the existing defaults by entering the storkctl get appreg command:

storkctl get applicationregistrations
NAME        KIND                       CRD-NAME                 VERSION    SUSPEND-OPTIONS                       KEEP-STATUS
cassandra CassandraDatacenter v1beta1 spec.stopped,bool false
couchbase CouchbaseBucket v2 false
couchbase CouchbaseCluster v2 spec.paused,bool false
couchbase CouchbaseEphemeralBucket v2 false
couchbase CouchbaseMemcachedBucket v2 false
couchbase CouchbaseReplication v2 false
couchbase CouchbaseUser v2 false
couchbase CouchbaseGroup v2 false
couchbase CouchbaseRoleBinding v2 false
couchbase CouchbaseBackup v2 false
couchbase CouchbaseBackupRestore v2 false
ibm IBPCA v1alpha1 spec.replicas,int false
ibm IBPConsole v1alpha1 spec.replicas,int false
ibm IBPOrderer v1alpha1 spec.replicas,int false
ibm IBPPeer v1alpha1 spec.replicas,int false
redis RedisEnterpriseCluster v1 false
redis RedisEnterpriseDatabase v1 false
weblogic Domain v8 spec.serverStartPolicy,string,NEVER false

Register a new CRD with Stork

To register a new CRD with Stork, perform the following steps:

  1. Create an applicationregistration spec, specifying the following:
  • With the name of the spec.

  • resources.PodsPath: (Optional) With The path which stores the pods created by the CR. These will be deleted when scaling down the migration.

  • With the group of the CRD being registered.

  • resources.version: With the version of the CRD being registered.

  • resources.kind: With the kind of the CRD being registered.

  • resources.keepStatus: (Optional) If you don't want to save the resource's status after migration, set this value to false.

  • resources.suspendOptions.path: (Optional) With the path in the CRD spec which contains the option to suspend the application.

  • resources.suspendOptions.type: (Optional) With the type of the field that is used to suspend the operation. For example, int, if the field contains the replica count for the application.

    kind: ApplicationRegistration
    name: myappname
    - PodsPath: <POD_PATH>
    group: <CRD_GROUP_NAME>
    version: <CRD_VERSION>
    kind: <CR_KIND>
    # to keep status of CR on migration <!-- where does this apply? to keepStatus below it? can you elaborate more on the statement? -->
    keepStatus: false
    # To disable CR on migration,
    # CR spec path for disable
    path: <spec_path>
    type: <type_of_value_to_set> (can be "int"/"bool")

    The following example ApplicationRegistration allows Stork to back-up, restore, or migrate a datastax/cassandra operator:

    kind: ApplicationRegistration
    name: cassandra
    - PodsPath: ""
    version: v1beta1
    kind: CassandraDatacenter
    keepStatus: false #cassandra datacenter status will not be migrated
    path: spec.stopped #path to disable cassandra datacenter
    type: bool #type of value to be set for spec.stopped
  1. Apply the spec:

    kubectl apply -f <application-registration-spec>.yaml

Once you've applied the spec, you can verify it by entering the following storkctl get command, specifying your own application name:

storkctl get appreg <app-name>
NAME        KIND                  CRD-NAME                 VERSION   SUSPEND-OPTIONS     KEEP-STATUS
cassandra CassandraDatacenter v1beta1 spec.stopped,bool false

If you register your CRD with Stork using an applicationRegistration CRD, you do not need to modify the migration, backup, or restore specs.

Was this page helpful?