This is the documentation for the latest development version of Velero. Both code and docs may be unstable, and these docs are not guaranteed to be up to date or correct. See the latest version.
Data Mover Pods: Data Mover Pods are:
The Velero node-agent is a DaemonSet that hosts modules for completing backup and restore operations, including file system backup/restore and CSI snapshot data movement. This document provides comprehensive configuration options for the ConfigMap provisioned by node-agent’s --node-agent-configmap parameter.
Node-agent puts advanced configurations of Data Mover Pods into a ConfigMap that contains JSON configuration. The ConfigMap should be created in the same namespace where Velero is installed, and its name is specified using the --node-agent-configmap parameter.
Notice: The ConfigMap’s life cycle control is out of the scope of Velero. Users need to create and maintain the ConfigMap themselves.
Important: The node-agent server checks configurations at startup time. After editing the ConfigMap, restart the node-agent DaemonSet for changes to take effect.
kubectl rollout restart -n <velero-namespace> daemonset/node-agent
To create the ConfigMap:
kubectl create cm <ConfigMap-Name> -n velero --from-file=<json-file-name>
The ConfigMap name can be specified during Velero installation:
velero install --node-agent-configmap=<ConfigMap-Name>
To apply the ConfigMap to the node-agent DaemonSet:
kubectl edit ds node-agent -n velero
Add the ConfigMap reference to the container arguments:
spec:
template:
spec:
containers:
- args:
- --node-agent-configmap=<ConfigMap-Name>
loadConcurrency)Controls the concurrent number of Data Mover Pods per node to optimize resource usage and performance.
The configurations work for PodVolumeBackup, PodVolumeRestore, DataUpload, and DataDownload pods.
globalConfig: Set default concurrent number applied to all nodes.perNodeConfig: Set different concurrent numbers for specific nodes using label selectors.prepareQueueLength: Set the max number of intermediate backup/restore pods under pending status.Sets a default concurrent number applied to all nodes:
{
"loadConcurrency": {
"globalConfig": 2
}
}
Specify different concurrent numbers for specific nodes using label selectors:
{
"loadConcurrency": {
"globalConfig": 2,
"perNodeConfig": [
{
"nodeSelector": {
"matchLabels": {
"kubernetes.io/hostname": "node1"
}
},
"number": 3
},
{
"nodeSelector": {
"matchLabels": {
"beta.kubernetes.io/instance-type": "Standard_B4ms"
}
},
"number": 5
}
]
}
}
Use Cases:
The prepare queue length controls the maximum number of DataUpload/DataDownload/PodVolumeBackup/PodVolumeRestore CRs under the preparation statuses but are not yet processed by any node, which means the CR corresponding pod is pending state.
If there are thousands of intermediate backup/restore pods, and without this control, they start at the same time, then causing a big burden on the k8s API server.
{
"loadConcurrency": {
"prepareQueueLength": 10
}
}
Use Cases:
Affected CR Phases:
Accepted or Prepared phasesloadAffinity)Constrains which nodes can run Data Mover Pods for CSI Snapshot Data Movement using affinity and anti-affinity rules.
The configurations work for DataUpload, and DataDownload pods.
For detailed information, see Node Selection for Data Movement.
Example:
{
"loadAffinity": [
{
"nodeSelector": {
"matchLabels": {
"beta.kubernetes.io/instance-type": "Standard_B4ms"
},
"matchExpressions": [
{
"key": "kubernetes.io/hostname",
"values": ["node-1", "node-2", "node-3"],
"operator": "In"
},
{
"key": "critical-workload",
"operator": "DoesNotExist"
}
]
}
}
]
}
nodeSelector: Specify DataUpload and DataDownload pods can run on which nodes.storageClass: Filter DataUpload and DataDownload pods on the PVC’s StorageClass. If not set, its corresponding nodeSelector applies to all DataUpload and DataDownload pods.Important Limitations:
storageClass parameter in the loadAffinity array is used for general node selectionstorageClass fieldmatchLabels and matchExpressions in a single elementUse Cases:
Configure different node selection rules for specific storage classes:
fast-ssd, the first match is chosen, which is nodes with label "environment": "production".hdd, the nodes with label "environment": "backup" are chosen.{
"loadAffinity": [
{
"nodeSelector": {
"matchLabels": {
"environment": "production"
}
},
"storageClass": "fast-ssd"
},
{
"nodeSelector": {
"matchLabels": {
"environment": "staging"
}
},
"storageClass": "fast-ssd"
},
{
"nodeSelector": {
"matchLabels": {
"environment": "backup"
}
},
"storageClass": "hdd"
}
]
}
podResources)Configure CPU and memory resources for Data Mover Pods to optimize performance and prevent resource conflict.
The configurations work for PodVolumeBackup, PodVolumeRestore, DataUpload, and DataDownload pods.
{
"podResources": {
"cpuRequest": "1000m",
"cpuLimit": "2000m",
"memoryRequest": "1Gi",
"memoryLimit": "4Gi"
}
}
Use Cases:
Values: Must be valid Kubernetes Quantity expressions
Validation: Request values must not exceed limit values
Default: BestEffort QoS if not specified
Failure Handling: Invalid values cause the entire podResources section to be ignored
For detailed information, see Data Movement Pod Resource Configuration.
priorityClassName)Configure the Data Mover Pods’ PriorityClass.
The configurations work for PodVolumeBackup, PodVolumeRestore, DataUpload, and DataDownload pods.
priorityClassName: The name of the PriorityClass to assign to backup/restore podsConfigure pod priority to control scheduling behavior:
High Priority (e.g., system-cluster-critical):
Low Priority (e.g., low-priority):
{
"priorityClassName": "low-priority"
}
Use Cases:
backupPVC)Configure intermediate PVCs used during data movement backup operations for optimal performance.
The configurations work for DataUpload pods.
For detailed information, see BackupPVC Configuration for Data Movement Backup.
storageClass: Alternative storage class for backup PVCs (defaults to source PVC’s storage class)readOnly: This is a boolean value. If set to true then ReadOnlyMany will be the only value set to the backupPVC’s access modes. Otherwise ReadWriteOnce value will be used.spcNoRelabeling: This is a boolean value. If set to true, then pod.Spec.SecurityContext.SELinuxOptions.Type will be set to spc_t. From the SELinux point of view, this will be considered a Super Privileged Container which means that selinux enforcement will be disabled and volume relabeling will not occur. This field is ignored if readOnly is false.Use Cases:
Important Notes:
spcNoRelabeling: true when using readOnly: trueAccepted phase until timeout (30m default)storageClass specifies alternative storage class for backup PVCs (defaults to source PVC’s storage class).
Configure different backup PVC settings per source storage class:
{
"backupPVC": {
"fast-storage": {
"storageClass": "backup-storage-1"
},
"slow-storage": {
"storageClass": "backup-storage-2"
}
}
}
Create BackupPVC in ReadOnly mode, which can avoid full data clone during backup process in some storage providers, such as Ceph RBD.
{
"backupPVC": {
"source-storage-class": {
"storageClass": "backup-optimized-class",
"readOnly": true,
"spcNoRelabeling": true
}
}
}
restorePVC)Configure intermediate PVCs used by Data Mover Pods during CSI Snapshot Data Movement restore.
The configurations work for DataDownload pods.
{
"restorePVC": {
"ignoreDelayBinding": true
}
}
For detailed information, see RestorePVC Configuration for Data Movement Restore.
ignoreDelayBinding: Ignore WaitForFirstConsumer binding mode constraintsUse Cases:
Important Notes:
privilegedFsBackup)Add privileged permission in PodVolumeBackup and PodVolumeRestore created pod’s SecurityContext, because in some k8s environments, mounting HostPath volume needs privileged permission to work.
The configurations work for PodVolumeBackup, and PodVolumeRestore pods.
privilegedFsBackup: Boolean value to enable privileged security context for file system backup/restore pods{
"privilegedFsBackup": true
}
Use Cases:
Important Notes:
For detailed information, see Enable file system backup document
cachePVC)Configure intermediate PVCs used for CSI Snapshot Data Movement restore operations to cache the downloaded data.
The configurations work for DataDownload pods.
For detailed information, see Cache PVC Configuration for Data Movement Restore.
thresholdInGB: Minimum backup data size (in GB) to trigger cache PVC creation during restorestorageClass: Storage class used to create cache PVCs.Use Cases:
Important Notes:
{
"cachePVC": {
"thresholdInGB": 1,
"storageClass": "cache-optimized-storage"
}
}
Here’s a comprehensive example showing how all configuration sections work together:
{
"loadConcurrency": {
"globalConfig": 2,
"prepareQueueLength": 15,
"perNodeConfig": [
{
"nodeSelector": {
"matchLabels": {
"kubernetes.io/hostname": "node1"
}
},
"number": 3
}
]
},
"loadAffinity": [
{
"nodeSelector": {
"matchLabels": {
"node-type": "backup"
},
"matchExpressions": [
{
"key": "critical-workload",
"operator": "DoesNotExist"
}
]
}
},
{
"nodeSelector": {
"matchLabels": {
"environment": "staging"
}
},
"storageClass": "fast-ssd"
}
],
"podResources": {
"cpuRequest": "500m",
"cpuLimit": "1000m",
"memoryRequest": "1Gi",
"memoryLimit": "2Gi"
},
"priorityClassName": "backup-priority",
"backupPVC": {
"fast-storage": {
"storageClass": "backup-optimized-class",
"readOnly": true,
"spcNoRelabeling": true
},
"slow-storage": {
"storageClass": "backup-storage-2"
}
},
"restorePVC": {
"ignoreDelayBinding": true
},
"privilegedFsBackup": true,
"cachePVC": {
"thresholdInGB": 1,
"storageClass": "cache-optimized-storage"
}
}
This configuration:
node1spcNoRelabeling: true when using readOnly: trueTo verify your configuration is loaded correctly:
kubectl logs -n velero -l app=node-agent | grep -i config
To check current node-agent configuration:
kubectl get cm <ConfigMap-Name> -n velero -o yaml
For detailed information on specific configuration sections:
To help you get started, see the documentation.