Skip to content

Deploy your first service

This is the quick start with more meat on the bones. We’ll deploy a real nginx service with health checks, an exposed port, and an environment variable.

nginx.yaml:

service:
name: web
namespace: default
image: nginx:alpine
scale: 2
ports:
- name: http
port: 80
env:
NGINX_HOST: localhost
resources:
cpu:
request: 100m
limit: 500m
memory:
request: 64Mi
limit: 256Mi
health:
liveness:
type: http
path: /
port: 80
initialDelaySeconds: 5
intervalSeconds: 10
timeoutSeconds: 2
failureThreshold: 3
Terminal window
rune lint nginx.yaml

rune lint validates the schema and checks for common mistakes (typos in fields, invalid resource quantities, undefined references). Fix anything it flags before applying.

Terminal window
rune cast nginx.yaml

Output:

Service 'web' created in namespace 'default'.
Generation: 1
Waiting for rollout...
✓ web-instance-a4f9d2 Running
✓ web-instance-b7e3c1 Running
Rollout complete.

The CLI streams reconciliation progress until all instances are ready. Pass --detach to return immediately.

Terminal window
rune get services
rune get instances -n default
rune health web --checks
rune logs web --tail=20

rune health shows liveness probe results — useful when something looks wrong.

Change scale: 2 to scale: 4, then re-cast:

Terminal window
rune cast nginx.yaml

The reconciler computes the diff, increments the generation, and rolls in two new instances.

For a quick scale-only operation, skip the YAML edit:

Terminal window
rune scale web 4
Terminal window
rune get instances
rune get instance web-instance-a4f9d2 -o yaml

You’ll see status conditions, restart count, started-at, and the runner-specific details.

Terminal window
rune exec web sh
# or against a specific instance:
rune exec web-instance-a4f9d2 ls /etc/nginx
Terminal window
rune delete web

Or stop without deleting (keeps spec, drops to 0 instances):

Terminal window
rune stop web
rune scale web 2 # bring it back later
CommandWhat it did
rune lintValidated YAML.
rune castApplied the spec.
rune getRead service and instance state.
rune healthInspected liveness probes.
rune logsTailed container output.
rune scaleChanged desired replica count.
rune execRan a shell inside an instance.
rune deleteRemoved the service.