1. Worker Operations
  2. Kubernetes worker
  3. Configure a worker
Website
  • Worker operations
  • Kubernetes requirements
  • CPU and memory for workers and Jobs
  • Install a worker
  • Configure a worker
  • Scratch storage
  • Networking and egress
  • Worker security model
  • Worker health
  • Upgrade a worker
  • Troubleshooting

Configure a worker

Manage worker capacity, namespaces, scratch limits, local Secrets, and customer-defined egress guardrails.

Loading documentation…

Install a worker< PreviousScratch storageNext >

Powered by heyo

On this page

Supported settingsChange parallel capacityConfigure egress CIDR guardrailsManage local SecretsInspect the effective configuration

Configure the worker in both RestoreTrust and Kubernetes. The worker record controls project assignment and capacity; the generated Deployment carries the cluster-specific settings.

Supported settings

SettingWhere to manage itNotes
Name and descriptionWorker detail pageDoes not restart the agent
Max parallel jobsWorker detail page, then generated Deployment patchInteger from 1 to 64; the stored and advertised values must match
Agent CPU and memoryGenerated Deployment profileRequests and limits follow Max parallel jobs; see CPU and memory
Restore Job CPU and memoryDatabase schedule's Project worker tabOptional requests and limits for the database container only; blank means BestEffort
Agent and job namespacesGenerated installMust differ and should remain stable for the lifetime of the worker
Scratch StorageClassGenerated DeploymentEmpty uses the cluster default; each schedule sets the scratch size
Source and decryption SecretsJob namespaceNever create these in the agent namespace
Egress CIDR guardrailsAgent Deployment environmentOptional customer policy described below
Check the installed cluster settings

The Agent deployment patch on the worker detail page is pre-filled with the namespaces and StorageClass the agent reported at its last connection. If the page says the agent has not reported them (it never connected or runs an older image), enter the values of the running Deployment yourself; the suggested defaults may not match it.

Change parallel capacity

Changing only the worker record or only the Deployment creates a mismatch. Update both.

This capacity setting also selects the agent Pod's resource profile. It does not set requests or limits for the restore Jobs. Configure those on each database schedule if needed; see CPU and memory for workers and Jobs.

  1. 1

    Check cluster headroom

    Confirm that the cluster can run the new number of restore Jobs and attach the same number of scratch volumes. Update job-namespace quotas first if necessary.

  2. 2

    Save the worker capacity

    On the worker detail page, edit Max parallel jobs and save the value.

  3. 3

    Generate the matching Deployment

    In Agent deployment patch, check the pre-filled agent namespace, job namespace, and StorageClass. Copy the resulting Deployment.

  4. 4

    Apply and verify

    Apply the Deployment. The generated Recreate strategy stops the old Pod before starting the replacement.

    bash
    kubectl -n <AGENT_NAMESPACE> apply -f worker-deployment.yamlkubectl -n <AGENT_NAMESPACE> rollout status deployment/restoretrust-k8s-agent --timeout=5m

    In RestoreTrust, verify Online, Accepting jobs: Yes, and the expected advertised and effective capacity.

Configure egress CIDR guardrails

The worker always refuses source addresses in loopback, link-local, unspecified, and Kubernetes API ranges. Add your own cluster and management ranges to the agent container's environment:

yaml
env:  - name: RT_JOB_EGRESS_CLUSTER_CIDRS    value: "10.96.0.0/12,10.244.0.0/16"  - name: RT_JOB_EGRESS_DENY_CIDRS    value: "10.0.0.0/24,192.0.2.0/24"  - name: RT_JOB_EGRESS_ALLOW_CIDRS    value: "10.20.0.0/16,203.0.113.0/24"
  • RT_JOB_EGRESS_CLUSTER_CIDRS should contain your Pod and Service networks.
  • RT_JOB_EGRESS_DENY_CIDRS adds ranges a restore must never reach.
  • RT_JOB_EGRESS_ALLOW_CIDRS is optional. When set, every source address outside these ranges is denied.

Use comma-separated canonical IPv4 or IPv6 CIDRs. A malformed value prevents the agent from starting. An allowlist cannot override the built-in denied ranges.

Preserve customer additions

A generated Deployment patch contains RestoreTrust-managed settings. Reapply your approved CIDR environment values when reviewing an upgrade, and use kubectl diff before applying it.

Manage local Secrets

Create all source credentials and backup-decryption material in the job namespace referenced by RT_K8S_JOB_NAMESPACE. Secret names must match the source and schedule selections in RestoreTrust.

Do not:

  • copy restoretrust-worker-identity into the job namespace;
  • reference the worker identity Secret from a schedule;
  • grant the restoretrust-job ServiceAccount RBAC or cloud workload identity;
  • edit or rotate the worker identity JSON.

If the identity Secret is lost or exposed, create a replacement project worker and move schedules to it.

Inspect the effective configuration

These commands print configuration names and non-secret values. They do not decode the identity:

bash
kubectl -n <AGENT_NAMESPACE> get deployment restoretrust-k8s-agentkubectl -n <AGENT_NAMESPACE> get deployment restoretrust-k8s-agent \  -o jsonpath='{range .spec.template.spec.containers[?(@.name=="agent")].env[*]}{.name}={.value}{"\n"}{end}'kubectl -n <JOB_NAMESPACE> get serviceaccount restoretrust-job -o yaml

Changing namespaces in place is not supported. To move a worker to another namespace pair or cluster, create a replacement worker, install it, reassign schedules, and then uninstall the old worker.

Related topics

  • Size scratch storage
  • Plan CPU and memory
  • Configure networking and egress
  • Upgrade a worker safely