ClusterBackup resource¶
This section describes the ClusterBackup custom resource (CR) used in
the MOSK management API to configure a
MOSK or management cluster backup.
The ClusterBackup CR contains the following fields:
apiVersionAPI version of the object that is
kaas.mirantis.com/v1alpha1.
kindObject type that is
ClusterBackup.
metadataMetadata of the
ClusterBackupCR that contains the following fields:nameName of the
ClusterBackupobject.
namespaceProject name of the cluster that relates to
ClusterBackup.
After the
ClusterBackupobject is created, themetadatasection also contains details about the target cluster requesting the backup and identifiers of theClusterBackupobject:ownerReferencesDetails about the owner of the
ClusterBackupobject. Contains the following fields:apiVersionAPI version of the target
Clusterobject that owns theClusterBackupobject.
kindObject type of the target
Clusterobject that owns theClusterBackupobject.
nameName of the target
Clusterobject that owns theClusterBackupobject.
uidReference to the
targetClusterfield located in thespecsection of theClusterBackupobject.
resourceVersionResource version of the
ClusterBackupobject.
uidUnique identifier of the
ClusterBackupobject.
specSpecification of the
ClusterBackupCR that contains the following fields:parametersParameters of the
ClusterBackupCR. If empty, MOSK replaces it with thebackupsection values of the targetClusterobjectspec, if any. If backup parameters are configured neither through theClusternor through theClusterBackupobject, a local backup will be created and stored on one of the MKE manager nodes of the target cluster.Contains the following fields:
keyEncryptionKeyName of the Kubernetes secret that contains the encryption key that is used to encrypt the backup data. Requires either
rcloneornfsUploadUrlfield to be set.
nfsUploadUrlNFS URL for the backup data upload. For example,
nfs://1.2.3.4:/path. Mutually exclusive with therclonefield.
rcloneParameters of the rclone configuration. Mutually exclusive with the
nfsUploadUrlfield. Contains the following fields:bucketName of the remote rclone bucket containing the folder for the backup. Can be either a bucket name, or a bucket name with subfolders, if any. For example,
my-bucketormy-bucket/mke-backups/cluster1.
credentialName of the
RCloneCredentialobject that contains the credentials for the remote storage bucket.
targetClusterName of the target cluster for a backup.
fileNamesOptional list of custom file names for the required application backups. Contains the following field:
MKECustom file name for the MKE backup. For example,
my-mke-backup.tar.
If any file with the specified name already exists in the remote storage, it will be overwritten. If any backup with the specified name already exists in MKE, the backup will fail with the corresponding error.
createdByDetails about the user who initiated the backup. Contains the following field:
<user_type>Details about the user who initiated the backup. Possible user types:
userDetails about the Keycloak user who initiated the backup. Contains the following field:
uidUUID of a user in Keycloak. For example,
uid: 123e4567-e89b-12d3-a456-426614174000. If using a certificate, theuidis the common name of this certificate.
updateReleaseDetails about the update release that initiated the backup. For example,
updateRelease: mke-20.0.0-3.7.24indicating that the backup was initiated by the Cluster release 20.0.0 containing the MKE release 3.7.24.
scheduleName of the backup schedule that initiated the backup. For example,
schedule: test-schedule.
deleteConfiguration of the remote backup deletion. Boolean. Set to
trueto request remote backup deletion.Note
Deletion of the
ClusterBackupobject itself only triggers deletion of related Kubernetes objects created during backup. Therefore, always request deletion from the remote storage backend using thedeletefield before deleting the object itself.
statusStatus of the
ClusterBackupCR. Contains the following fields:completedAtTimestamp of the backup completion.
deletedAtTimestamp of the backup deletion.
fileNamesList of file names included in the backup.
startedAtTimestamp of the backup start.
uploadedAtTimestamp of the backup upload to the target storage.
statusStatus of the backup on the remote storage. Possible values:
CompletedBackup has been completed.
DeletedBackup has been deleted.
DeleteFailedBackup deletion has failed.
DeletionInProgressBackup deletion is in progress.
DeletionPendingBackup deletion is pending.
FailedBackup has failed.
InProgressBackup is in progress.
PendingBackup is pending.
StuckBackup is stuck and requires manual intervention.
UploadingInProgressBackup upload is in progress.
UploadPendingBackup upload is pending.
Configuration example of a completed ClusterBackup object encrypted by a
referenced encryption key and uploaded to a remote rclone storage:
apiVersion: kaas.mirantis.com/v1alpha1
kind: ClusterBackup
metadata:
creationTimestamp: "2026-01-15T17:39:30Z"
finalizers:
- kaas.mirantis.com/clusterbackup-finalizer
generation: 1
name: test-create-clusterbackup
namespace: default
ownerReferences:
- apiVersion: cluster.k8s.io/v1alpha1
kind: Cluster
name: kaas-mgmt
uid: 89d9764e-cab6-40b0-9368-c4fcebde0aa4
resourceVersion: "1237765"
uid: 9f2d7888-6da2-4f6e-8547-4c1b4533e442
spec:
createdBy:
user:
uid: admin
parameters:
keyEncryptionKey: swift-s3
rclone:
bucket: test
credential: swift-s3
targetCluster: kaas-mgmt
status:
completedAt: "2026-01-15T17:40:26Z"
fileNames:
MKE: test:test-create-clusterbackup.encrypted
startedAt: "2026-01-15T17:40:19Z"
status: Completed
uploadedAt: "2026-01-15T17:42:22Z"