Version
Required. SDL version identifier.
version: "2.0"| Value | Description |
|---|---|
"2.0" | Current stable version |
Services
Define containers and networking.
image
Required. Docker image to deploy.
image: nginx:1.25.3Supports any public registry (Docker Hub, GHCR, GCR, ECR, etc.)
Best Practice: Always specify a version tag (e.g., nginx:1.25.3) instead of using :latest or omitting the tag. This ensures reproducible deployments and prevents unexpected updates.
command & args
Optional. Override container entrypoint.
command: - /bin/sh - -cargs: - | npm startenv
Optional. Environment variables as KEY=value strings.
env: - NODE_ENV=production - DATABASE_URL=postgresql://db:5432/myappexpose
Required for individual services. And at least one service in the deployment must have global: true in its expose configuration.
Services with only internal endpoints (e.g., database backends) are accessible only to other services within the deployment.
expose: - port: 80 # Container port (required) as: 80 # External port (default: same as port) proto: tcp # Protocol: tcp or udp (default: tcp) accept: # Accepted hostnames - example.com to: - global: true # Expose to internet (at least one required) http_options: # HTTP-specific options max_body_size: 1048576 read_timeout: 60000 send_timeout: 60000HTTP Options:
| Option | Default | Max | Description |
|---|---|---|---|
max_body_size | 1048576 | 104857600 | Max request body (bytes) |
read_timeout | 60000 | 60000 | Read timeout (ms) |
send_timeout | 60000 | 60000 | Send timeout (ms) |
next_tries | 3 | - | Retry attempts |
next_cases | [error, timeout] | - | When to retry |
credentials
Optional. Private registry authentication.
credentials: host: https://registry.example.com username: user password: passparams
Optional. Service-level runtime parameters. Groups storage mounts and inter-service RBAC permissions.
params: permissions: read: - logs - eventsparams.storage covers persistent-volume mounts and is documented under advanced features.
permissions
Optional. Grant a sibling service in the same deployment RBAC access to read this service’s runtime data. Used by log-collector and observability sidecars so they can tail logs and events from the target service’s pods.
params: permissions: read: - logs # pods, pods/log, deployments — read-only - events # kubernetes events — read-only| Scope | RBAC granted |
|---|---|
logs | get/list/watch on pods, get on pods/log, get/list/watch on apps/deployments |
events | get/list/watch on events |
The collector pod authenticates against the Kubernetes API using a ServiceAccount the provider mounts into every container. When the target service declares permissions.read, the provider attaches a matching Role and RoleBinding so collectors in the same deployment can call the API server. See Log Forwarding for the full sidecar pattern.
Profiles
Define resources and provider requirements.
compute
cpu
Required. CPU units (1000 = 1 core).
cpu: units: 1.0 # Cores (0.1, 0.5, 1.0, etc.)Limits: Min: 0.01 cores, Max: 384 cores
memory
Required. Memory allocation.
memory: size: 1Gi # RAM (Mi or Gi)Limits: Min: 1Mi, Max: 2Ti
storage
Required. At least one ephemeral storage volume required. Persistent storage is optional.
storage: - size: 1Gi # Ephemeral root volume (required) - name: data # Persistent volume (optional) size: 10Gi attributes: persistent: true # Survives restarts class: beta3 # Performance tierLimits: Min: 5Mi, Max: 32Ti per volume
Classes: default, beta1, beta2, beta3, ram
gpu
Optional. GPU resources.
gpu: units: 1 # Number of GPUs attributes: vendor: nvidia: - model: rtx4090 ram: 24Gi # Optional: filter by VRAM interface: pcie # Optional: pcie or sxmLimits: Max: 24 GPUs per service
Common models: a100, a40, rtx4090, rtx3090, t4, v100, h100
placement
Provider selection and pricing.
placement: akash: attributes: # Optional filters region: us-west pricing: # Required: max bid per service web: denom: uact amount: 100 # uakt per block (~6 sec)Pricing calculation:
Daily cost = (amount × 14,400 blocks) / 1,000,000 AKTExample: 100 uakt/block = 1.44 AKT/day = ~43 AKT/monthDeployment
Map services to profiles.
deployment: web: # Service name akash: # Placement name profile: web # Compute profile name count: 1 # Number of replicasNote: count cannot be changed after deployment. Max: 50 replicas per service.
Endpoints
Optional. Named IP endpoints for static IPs.
endpoints: myendpoint: kind: ipUse in services:
expose: - port: 1194 to: - global: true ip: myendpointQuick Reference
Minimum viable SDL:
version: "2.0"services: web: image: nginx:1.25.3 expose: - port: 80 as: 80 to: - global: trueprofiles: compute: web: resources: cpu: units: 0.5 memory: size: 512Mi storage: size: 512Mi placement: akash: pricing: web: denom: uact amount: 100deployment: web: akash: profile: web count: 1Common patterns:
Resource Limits (per service):
| Resource | Minimum | Maximum |
|---|---|---|
| CPU | 0.01 cores | 384 cores |
| Memory | 1Mi | 2Ti |
| Storage | 5Mi | 32Ti (per volume) |
| GPU | 0 (optional) | 24 units |
| Replicas (count) | 1 | 50 |
See also: