Velero with Google Cloud Storage Buckets - Configure Velero
Customize Velero to allow the configuration of a non-default backup location.
Create a
ConfigMap
to allow Velero to use GCS buckets as backup storage location:CODEcat <<EOF | kubectl apply -f - apiVersion: v1 kind: ConfigMap metadata: namespace: ${WORKSPACE_NAMESPACE} name: velero-overrides data: values.yaml: | initContainers: - name: velero-plugin-for-gcp image: velero/velero-plugin-for-gcp:v1.5.0 imagePullPolicy: IfNotPresent volumeMounts: - mountPath: /target name: plugins credentials: extraSecretRef: velero-gcp-credentials EOF
Patch the Velero
AppDeployment
to reference the createdConfigMap
with the Velero overrides:To update Velero in all clusters in a workspace:
CODEcat << EOF | kubectl -n ${WORKSPACE_NAMESPACE} patch appdeployment velero --type="merge" --patch-file=/dev/stdin spec: configOverrides: name: velero-overrides EOF
To update Velero for a specific cluster in a workspace, see Customize an Application per Cluster.
Check the
ConfigMap
on theHelmRelease
object:CODEkubectl get hr -n kommander velero -o jsonpath='{.spec.valuesFrom[?(@.name=="velero-overrides")]}'
The output looks like this if the deployment is successful:
CODE{"kind":"ConfigMap","name":"velero-overrides"}
Ensure that the Velero pod is running:
CODEkubectl get pods -A --kubeconfig=${CLUSTER_NAME}.conf |grep velero
You can also configure Velero by editing the kommander.yaml
and rerunning the installation. To follow this alternative configuration path, expand the following section:
Next Step:
Velero with Google Cloud Storage Buckets - Establish a Backup Location