Skip to main content
Worker services are background processing services that don’t expose HTTP endpoints. They’re ideal for queue consumers, background jobs, and long-running processes. This is a complete reference for all fields that can be set for a worker service in porter.yaml.

Field Reference


Basic Example


autoscaling

object Optional Configure horizontal pod autoscaling based on CPU and memory utilization. See Autoscaling Configuration for full documentation.

healthCheck

object Optional Configure a combined health check that applies to liveness, readiness, and startup probes. Worker services use command-based health checks since they don’t expose HTTP endpoints.
Cannot be used together with livenessCheck, readinessCheck, or startupCheck. Use either the combined healthCheck or the individual checks.
For best practices on combining command-based health checks with graceful shutdown (SIGTERM handling, shutdown markers), see Zero-Downtime Deployments: Workers.

Advanced Health Checks

For fine-grained control, configure liveness, readiness, and startup probes separately.

livenessCheck

object Optional Determines if the container should be restarted.

readinessCheck

object Optional Determines if the container is ready to receive work.

startupCheck

object Optional Used for slow-starting containers. Other probes are disabled until this passes.

connections

array Optional Connect to external cloud services. See Connections Configuration for full documentation.

serviceMeshEnabled

boolean Optional Enable service mesh for enhanced inter-service communication with improved performance, reliability, and monitoring.
Useful for workers that need to communicate with other services in your cluster.

terminationGracePeriodSeconds

integer Optional Seconds to wait for graceful shutdown before forcefully terminating the container.
Set this to a value higher than your longest expected job. This gives workers time to complete in-progress work before shutdown.

gpuCoresNvidia

integer Optional Allocate NVIDIA GPU cores for ML workloads or GPU-accelerated processing.
Requires a node group with GPU-enabled instances.

Complete Example


Common Use Cases

Queue Consumer

Background Job Processor

ML Inference Worker