Skip to main content
Skip table of contents

Prepare your Cluster for Backup - Azure, vSphere, GCP, Pre-provisioned Environments

This section describes how to prepare your cluster on AWS, Azure, vSphere, Google Cloud or pre-provisioned environment, so it can be backed up before you begin with Platform Expansion: Convert a DKP Essential Cluster to a DKP Enterprise Managed Cluster.

Prerequisites

  • Ensure Velero is installed on your Essential cluster

  • Install the Velero CLI (Use at least Velero CLI version 1.10.1)

  • Ensure kubectl is installed

  • Ensure you have admin rights to the DKP Essential cluster

Prepare your Cluster

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.

Prepare Velero

Enable restic backup capabilities by providing a custom configuration of Velero.

  1. Create an Override with a custom configuration for Velero. This custom configuration deploys the node-agent service, which enables restic:

    CODE
    cat << EOF | kubectl apply -f -
    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: velero-overrides
      namespace: kommander
    data:
      values.yaml: |
        ---
        deployNodeAgent: true
    EOF
  2. Reference the created Override in Velero’s AppDeployment to apply the new configuration:

    CODE
    cat << EOF | kubectl -n kommander patch appdeployment velero --type='merge' --patch-file=/dev/stdin
    spec:
      configOverrides:
        name: velero-overrides
    EOF
  3. Wait until the node-agent has been deployed:

    CODE
    until kubectl get daemonset -A | grep -m 1 "node-agent"; do 0.1 ; done

    The node-agent is ready after a similar output appears:

    CODE
    kommander                node-agent                                       
    3         3        0       3            0           <none>
  4. Verify the configuration has been updated before proceeding with the next section:

    CODE
    kubectl -n kommander wait --for=condition=Ready kustomization velero

    The output should look similar to this:

    CODE
    kustomization.kustomize.toolkit.fluxcd.io/velero condition met

Prepare your Pods for Backup

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.

Annotate the gitea pods to ensure restic backs up the Persistent Volumes (PVs) of the pods that will be affected during the expansion process. These volumes contain the Git repository information of your DKP Essential cluster.

CODE
kubectl -n kommander annotate pod/gitea-0 backup.velero.io/backup-volumes=data
CODE
kubectl -n kommander annotate pod/gitea-postgresql-0 backup.velero.io/backup-volumes=data

Next Step:

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

JavaScript errors detected

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

If this problem persists, please contact our support.