Skip to main content
Skip table of contents

Back up a Cluster - Azure, vSphere, GCP, and Pre-provisioned Environments

With this workflow, you can back up and restore your cluster’s applications. This backup contains Kubernetes objects and the Persistent Volumes (PVs) of Gitea pods. Given that Gitea’s PVs store information on your cluster’s state, you will be able to Restore your Cluster, if required.

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

  1. 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:

    CODE
    velero backup create pre-expansion \
      --include-namespaces="kommander,kommander-default-workspace,kommander-flux,kubecost" \
      --include-cluster-resources \
      --snapshot-volumes=false --wait \
      --namespace kommander

    After completion, the output should look similar to this:

    CODE
    Backup 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

  1. Ensure the backup has completed successfully:

    CODE
    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:

    CODE
    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>
  2. Ensure that the PodVolumeBackup objects have been created:

    CODE
    kubectl get podvolumebackups -A

    The output should look similar to this:

    CODE
    NAMESPACE   NAME        STATUS      CREATED   NAMESPACE   POD                  VOLUME   REPOSITORY ID                                                                                                        UPLOADER TYPE   STORAGE LOCATION   AGE
    kommander   ash-59ntg   Completed   39s       kommander   gitea-postgresql-0   data     s3:https://a54904d80411e4d64b572b96cb3ddb62-477717230.us-west-2.elb.amazonaws.com:8085/dkp-velero/restic/kommander   restic          default            39s
    kommander   ash-5vsbf   Completed   42s       kommander   gitea-0              data     s3:https://a54904d80411e4d64b572b96cb3ddb62-477717230.us-west-2.elb.amazonaws.com:8085/dkp-velero/restic/kommander   restic          default            42s

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

Related Topics

Restore your Backup and Retry the Cluster Expansion

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.