Worker
Explains workers for background and task-based execution.
A Worker is a long-running DataOS workload for background execution. Use a Worker when a process must keep running without exposing a Service endpoint, such as a stream processor, queue consumer, scheduler loop, or custom container that continuously performs work.
Workers are different from Workflows. A Workflow executes one or more jobs and then completes. A Worker is reconciled as a running workload and remains active until it is updated, suspended, or deleted.
Workers are also different from Services. A Service exposes one or more network ports for consumers. A Worker runs background logic and does not need to expose a port.
Access requirements
Before creating or managing a Worker, ensure you have the required permissions. See Worker: Access control.
When to use
Use a Worker when you need to:
Run a long-lived process without an exposed endpoint.
Continuously consume or process events.
Run a containerized background loop.
Keep one or more replicas of the same background process active.
Run stream processing or sinking logic using a supported stack.
Common examples include stream processors, queue consumers, data sinkers, schedulers, and monitoring or reconciliation loops.
Manifest structure
A Worker manifest uses the common Resource metadata fields and a spec section that defines how the Worker runs.
Create a Worker
Create a Worker in four steps:
Define how the background process should run.
Add any supporting Resources.
Apply the manifest.
Verify the runtime state.
1. Define how the background process should run
Start with the required fields:
nameandtype: workerspec.computespec.stackspec.stackSpec
Then decide whether the Worker also needs:
replicasfor parallel background executionexecutionModefor runtime-specific behaviorresourcesfor CPU and memory controlsdiskoruse.volumesfor persistent filesuse.projectionfor Secrets, environment variables, and files
2. Add supporting Resources
Create supporting Resources before the Worker when the runtime depends on them.
Common dependencies include:
a Secret for credentials
a Volume for persistent storage
a Bundle when deployment order or verification must be enforced
3. Apply the manifest
Apply the supporting Resources first, then apply the Worker.
If the Worker depends on multiple Resources, apply them as one Bundle instead.
4. Verify the Worker
Check that the Worker is active and that the runtime is running.
If needed, inspect Worker logs after the runtime is healthy.
Learn the building blocks
Use Core concepts for replicas, execution mode, resources, stacks, projections, and storage.
Use Example for end-to-end Worker manifests.
Apply and manage
Apply the Worker:
Apply a Bundle:
Check the Worker:
List Workers:
Get Worker logs:
Delete the Worker:
Delete by identifier:
Delete by manifest:
Field reference
See Field reference for the complete Worker manifest field reference, including nested runtime fields.
Last updated
Was this helpful?