Back up a Cluster - AWS Environment
With this workflow, you can back up and restore your cluster’s applications. The backup contains all Kubernetes objects and the Persistent Volumes of your DKP applications.
When backing up a cluster that runs on a cloud provider, Velero captures the state of your cluster in a snapshot. Review Velero’s list of cloud providers for CSI compatibility.
Run the following commands in the DKP Essential cluster. For general guidelines on how to set the context, refer to Provide Context for Commands with a kubeconfig File.
Back up Instructions
Configure Velero to use CSI snapshotting:
CODEvelero client config set features=EnableCSI
Create a backup with Velero. Use the following flags to reduce the scope of the backup and only include the applications that are affected during the expansion:
CODEvelero backup create pre-expansion \ --include-namespaces="kommander,kommander-default-workspace,kommander-flux,kubecost" \ --include-cluster-resources \ --wait
After completion, the output should look similar to this:
CODEBackup request "pre-expansion" submitted successfully. Waiting for backup to complete. You may safely press ctrl-c to stop waiting - your backup will continue in the background. ............................................................................................................................................................................................................................................................... Backup completed with status: Completed. You may check for more information using the commands `velero backup describe pre-expansion` and `velero backup logs pre-expansion`.
Verify the Backup
Review the backup has completed successfully:
velero backup describe pre-expansion
The following example output will vary depending on your cloud provider. Verify that it shows no errors and the Phase
is Completed
:
Name: pre-expansion
Namespace: kommander
Labels: velero.io/storage-location=default
Annotations: velero.io/source-cluster-k8s-gitversion=v1.25.5
velero.io/source-cluster-k8s-major-version=1
velero.io/source-cluster-k8s-minor-version=25
Phase: Completed
Errors: 0
Warnings: 0
Namespaces:
Included: kommander, kommander-default-workspace, kommander-flux, kubecost
Excluded: <none>
Resources:
Included: *
Excluded: <none>
Cluster-scoped: included
Label selector: <none>
Storage Location: default
Velero-Native Snapshot PVs: auto
TTL: 720h0m0s
CSISnapshotTimeout: 10m0s
Hooks: <none>
Backup Format Version: 1.1.0
Started: 2023-03-15 10:40:25 -0400 EDT
Completed: 2023-03-15 10:44:39 -0400 EDT
Expiration: 2023-04-14 10:40:24 -0400 EDT
Total items to be backed up: 5188
Items backed up: 5188
Velero-Native Snapshots: <none included>
Next Step
Expand your platform. Use the UI or CLI:
UI: Convert an Essential Cluster into a Managed Cluster
CLI: Convert an Essential Cluster into a Managed Cluster