Skip to content

    Overview

    A SchemaRegistryBackup is used for backing up schemas from a SchemaRegistry, and offloading them to a Storage. It is configured by creating a SchemaRegistryBackup resource in Kubernetes.

    The Kannika Armory Operator creates a Pod that runs the backup process, based on the configuration in the SchemaRegistryBackup resource.

    Usage

    SchemaRegistryBackups can be managed using the kubectl command line tool, and are available by the name schemaregistrybackup or schemaregistrybackups.

    Terminal window
    $ kubectl get schemaregistrybackups
    NAME STATUS
    confluent-registry-backup 🚀 Running

    Backup Status

    A SchemaRegistryBackup can have the following statuses:

    • Initializing The backup process is being created
    • Running The backup process is running
    • Error The backup process has encountered an error

    Configuring a SchemaRegistryBackup

    The following is an example of a SchemaRegistryBackup.

    apiVersion: kannika.io/v1alpha
    kind: SchemaRegistryBackup
    metadata:
    name: confluent-registry-backup
    spec:
    enabled: true
    registry: confluent-registry
    registryCredentialsFrom:
    credentialsRef:
    name: confluent-registry-creds
    storage: local-storage
    # An optional explicit interval between backups in seconds
    backupIntervalSecs: 15

    In this example:

    • A SchemaRegistryBackup named confluent-registry-backup is created, as indicated by the .metadata.name field. This name will inherited by the Pod running the backup process.

    • The backup is enabled by setting the spec.enabled to true. Unless this flag is set, the backup container will not be started.

    • The SchemaRegistryBackup will connect to the confluent-registry SchemaRegistry to fetch schemas, as indicated by the .spec.registry field, and use the Credentials referenced by confluent-registry-creds for authentication.

    • The SchemaRegistryBackup will write data to the local-storage Storage defined in the spec.storage field.

    • The interval between API fetches and synchronization with the remote storage is set to 15 seconds by the spec.backupIntervalSecs field. If not specified, backups will occur every 3600 seconds.