Service
Explains services for long-running and exposed workloads.
A Service is a long-running DataOS workload that runs continuously and exposes one or more network ports. Use a Service when an application must stay available to receive traffic, serve APIs, process streams, or host a server such as Postgres, an HTTP API, or a custom containerized application.
Services are different from Workflows. A Workflow runs one or more jobs and then completes. A Service is reconciled as a running workload and remains active until it is updated, suspended, or deleted.
Access requirements
Before creating or managing a Service, ensure you have the required permissions. See Service: Access control.
When to use
Use a Service when you need to:
Run a long-lived process.
Expose TCP or HTTP ports.
Host a custom container image.
Run a stateful application with an attached disk or Volume.
Keep one or more replicas of the same application available.
Common examples include API servers, model-serving endpoints, webhook receivers, streaming consumers, and test databases used by other workloads.
Manifest structure
A Service manifest uses the common Resource metadata fields and a spec section that defines how the service runs.
Create a Service
Create a Service in four steps:
Define how the workload should run.
Add any supporting Resources.
Apply the manifest.
Verify the runtime state.
1. Define how the workload should run
Start with the required fields:
nameandtype: servicespec.computespec.stackspec.stackSpec
Then decide whether the Service also needs:
servicePortsfor network accessreplicasfor horizontal availabilitystateful: truewithdiskoruse.volumesfor persistent datause.projectionfor Secrets and environment variables
2. Add supporting Resources
Create supporting Resources before the Service when the runtime depends on them.
Common dependencies include:
a Secret for credentials
a Volume for persistent storage
a Bundle when deployment order must be enforced
3. Apply the manifest
Apply the supporting Resources first, then apply the Service.
If the Service depends on multiple Resources, apply them as one Bundle instead.
4. Verify the Service
Check that the Service is active and that the runtime is running.
If the Service exposes a port, test connectivity from the intended client after the runtime is healthy.
Learn the building blocks
Use Core concepts for the full runtime model.
Use Example for end-to-end Service manifests.
For projection-specific setup and syntax, see Projections.
Apply and manage
Apply the Secret before applying the Service, unless both are packaged in a Bundle.
Apply a Bundle:
Check the Service:
Delete the Service:
Field reference
See Field reference for the complete Service manifest field reference, including nested spec.servicePorts, spec.disk, and spec.use.volumes fields.
Last updated
Was this helpful?