Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

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:

  1. Define how the workload should run.

  2. Add any supporting Resources.

  3. Apply the manifest.

  4. Verify the runtime state.

1. Define how the workload should run

Start with the required fields:

  • name and type: service

  • spec.compute

  • spec.stack

  • spec.stackSpec

Then decide whether the Service also needs:

  • servicePorts for network access

  • replicas for horizontal availability

  • stateful: true with disk or use.volumes for persistent data

  • use.projection for 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?