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.
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 node-agent through a ConfigMap.
Node-agent configuration is provided through a ConfigMap that contains JSON configuration for various aspects of data movement operations. The ConfigMap should be created in the same namespace where Velero is installed, and its name is specified using the --node-agent-configmap parameter.
The ConfigMap name can be specified during Velero installation:
velero install --node-agent-configmap=<ConfigMap-Name>
To create the ConfigMap:
kubectl create cm <ConfigMap-Name> -n velero --from-file=<json-file-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>
Important: The node-agent server checks configurations at startup time. After editing the ConfigMap, restart the node-agent DaemonSet for changes to take effect.
loadConcurrency)Controls the concurrent number of data movement operations per node to optimize resource usage and performance.
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:
For detailed information, see Node-agent Concurrency.
loadAffinity)Constrains which nodes can run data movement operations using affinity and anti-affinity rules.
{
"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"
}
]
}
}
]
}
Configure different node selection rules for specific storage classes:
{
"loadAffinity": [
{
"nodeSelector": {
"matchLabels": {
"environment": "production"
}
},
"storageClass": "fast-ssd"
},
{
"nodeSelector": {
"matchLabels": {
"environment": "backup"
}
}
}
]
}
Important Limitations:
loadAffinity array is used for general node selectionstorageClass fieldmatchLabels and matchExpressions in a single elementUse Cases:
For detailed information, see Node Selection for Data Movement.
podResources)Configure CPU and memory resources for data mover pods to optimize performance and prevent resource conflicts.
{
"podResources": {
"cpuRequest": "1000m",
"cpuLimit": "2000m",
"memoryRequest": "1Gi",
"memoryLimit": "4Gi"
},
"priorityClassName": "backup-priority"
}
podResources section to be ignoredConfigure pod priority to control scheduling behavior:
High Priority (e.g., system-cluster-critical):
Low Priority (e.g., low-priority):
Use Cases:
For detailed information, see Data Movement Pod Resource Configuration.
backupPVC)Configure intermediate PVCs used during data movement backup operations for optimal performance.
{
"backupPVC": {
"source-storage-class": {
"storageClass": "backup-optimized-class",
"readOnly": true,
"spcNoRelabeling": true
}
}
}
storageClass: Alternative storage class for backup PVCs (defaults to source PVC’s storage class)readOnly: Use ReadOnlyMany access mode for faster volume creation from snapshotsspcNoRelabeling: Required in SELinux clusters when using readOnly modeConfigure different backup PVC settings per source storage class:
{
"backupPVC": {
"fast-storage": {
"storageClass": "backup-storage",
"readOnly": true
},
"slow-storage": {
"storageClass": "backup-storage"
}
}
}
Use Cases:
Important Notes:
spcNoRelabeling: true when using readOnly: trueAccepted phase until timeout (30m default)For detailed information, see BackupPVC Configuration for Data Movement Backup.
restorePVC)Configure intermediate PVCs used during data movement restore operations.
{
"restorePVC": {
"ignoreDelayBinding": true
}
}
ignoreDelayBinding: Ignore WaitForFirstConsumer binding mode constraintsUse Cases:
Important Notes:
For detailed information, see RestorePVC Configuration for Data Movement Restore.
prepareQueueLength)Control the maximum number of backup/restore operations that can be in preparation phases simultaneously.
{
"prepareQueueLength": 10
}
Use Cases:
Affected CR Phases:
Accepted or Prepared phasesFor detailed information, see Node-agent Prepare Queue Length.
Here’s a comprehensive example showing how all configuration sections work together:
{
"loadConcurrency": {
"globalConfig": 2,
"perNodeConfig": [
{
"nodeSelector": {
"matchLabels": {
"node-type": "backup"
}
},
"number": 4
}
]
},
"loadAffinity": [
{
"nodeSelector": {
"matchLabels": {
"node-type": "backup"
},
"matchExpressions": [
{
"key": "critical-workload",
"operator": "DoesNotExist"
}
]
}
},
{
"nodeSelector": {
"matchLabels": {
"storage-tier": "fast"
}
},
"storageClass": "fast-ssd"
}
],
"podResources": {
"cpuRequest": "500m",
"cpuLimit": "1000m",
"memoryRequest": "1Gi",
"memoryLimit": "2Gi"
},
"priorityClassName": "backup-priority",
"backupPVC": {
"fast-ssd": {
"storageClass": "backup-optimized",
"readOnly": true
},
"standard": {
"storageClass": "backup-standard"
}
},
"restorePVC": {
"ignoreDelayBinding": true
},
"prepareQueueLength": 15
}
This configuration:
spcNoRelabeling: 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.