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.
Create an Override with a custom configuration for Velero. This custom configuration deploys the
node-agent
service, which enablesrestic
:CODEcat << EOF | kubectl apply -f - apiVersion: v1 kind: ConfigMap metadata: name: velero-overrides namespace: kommander data: values.yaml: | --- deployNodeAgent: true EOF
Reference the created Override in Velero’s
AppDeployment
to apply the new configuration:CODEcat << EOF | kubectl -n kommander patch appdeployment velero --type='merge' --patch-file=/dev/stdin spec: configOverrides: name: velero-overrides EOF
Wait until the
node-agent
has been deployed:CODEuntil kubectl get daemonset -A | grep -m 1 "node-agent"; do 0.1 ; done
The
node-agent
is ready after a similar output appears:CODEkommander node-agent 3 3 0 3 0 <none>
Verify the configuration has been updated before proceeding with the next section:
CODEkubectl -n kommander wait --for=condition=Ready kustomization velero
The output should look similar to this:
CODEkustomization.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.
kubectl -n kommander annotate pod/gitea-0 backup.velero.io/backup-volumes=data
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