Customization#
This section covers different topics of customization regarding backing up and restoring k0rdent.
Velero installation#
The Velero helm chart is supplied with the k0rdent helm chart and is enabled by default. There are 2 ways of customizing the chart values:
-
Install using
helmand add corresponding parameters to thehelm installcommand.Note
Only a plugin that supports Object Store is required during restoration; the other parameters are optional.
For example, this command installs k0rdent via
helm installwith a configured plugin,BackupStorageLocationand propagated credentials:helm install kcm oci://ghcr.io/k0rdent/kcm/charts/kcm \ --version <version> \ --create-namespace \ --namespace kcm-system \ --set-file regional.velero.credentials.secretContents.cloud=<full-path-to-file> \ --set regional.velero.credentials.useSecret=true \ --set regional.velero.backupsEnabled=true \ --set regional.velero.configuration.backupStorageLocation[0].name=<backup-storage-location-name> \ --set regional.velero.configuration.backupStorageLocation[0].provider=<provider-name> \ --set regional.velero.configuration.backupStorageLocation[0].bucket=<bucket-name> \ --set regional.velero.configuration.backupStorageLocation[0].config.region=<region> \ --set regional.velero.initContainers[0].name=velero-plugin-for-<provider-name> \ --set regional.velero.initContainers[0].image=velero/velero-plugin-for-<provider-name>:<provider-plugin-tag> \ --set regional.velero.initContainers[0].volumeMounts[0].mountPath=/target \ --set regional.velero.initContainers[0].volumeMounts[0].name=plugins -
Create or modify the existing
Managementobject in the.spec.config.kcm.Note
Only a plugin that supports Object Store is required during restoration; the other parameters are optional.
For example, this is a
Managementobject with a configured plugin and enabled metrics:apiVersion: k0rdent.mirantis.com/v1beta1 kind: Management metadata: name: kcm spec: # ... core: kcm: config: regional: velero: initContainers: - name: velero-plugin-for-<provider-name> image: velero/velero-plugin-for-<provider-name>:<provider-plugin-tag> imagePullPolicy: IfNotPresent volumeMounts: - mountPath: /target name: plugins metrics: enabled: true # ...
To fully disable velero, set the regional.velero.enabled parameter to false.
Schedule Expression Format#
The ManagementBackup .spec.schedule field accepts a correct
Cron expression,
along with the
nonstandard predefined scheduling definitions
and an extra definition @every with a number and a valid time unit
(valid time units are ns, us (or µs), ms, s, m, h).
The following list contains acceptable .spec.schedule example values:
0 */1 * * *(standard Cron expression)@hourly(nonstandard predefined definition)@every 1h(extra definition)
Putting Extra Objects in a Management Backup#
If you need to back up objects other than those backed up by default,
you can add the label k0rdent.mirantis.com/component="kcm" to these objects.
All objects containing the label will be automatically added to the management backup.