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:

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

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

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

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

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

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

    The output should look similar to this:

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

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.

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
CODE

Next Step:

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