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.
1. Write the spec
Section titled “1. Write the spec”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: 32. Lint before you cast
Section titled “2. Lint before you cast”rune lint nginx.yamlrune lint validates the schema and checks for common mistakes (typos in fields, invalid resource quantities, undefined references). Fix anything it flags before applying.
3. Apply
Section titled “3. Apply”rune cast nginx.yamlOutput:
Service 'web' created in namespace 'default'.Generation: 1Waiting for rollout... ✓ web-instance-a4f9d2 Running ✓ web-instance-b7e3c1 RunningRollout complete.The CLI streams reconciliation progress until all instances are ready. Pass --detach to return immediately.
4. Verify
Section titled “4. Verify”rune get servicesrune get instances -n defaultrune health web --checksrune logs web --tail=20rune health shows liveness probe results — useful when something looks wrong.
5. Iterate
Section titled “5. Iterate”Change scale: 2 to scale: 4, then re-cast:
rune cast nginx.yamlThe reconciler computes the diff, increments the generation, and rolls in two new instances.
For a quick scale-only operation, skip the YAML edit:
rune scale web 46. Inspect a single instance
Section titled “6. Inspect a single instance”rune get instancesrune get instance web-instance-a4f9d2 -o yamlYou’ll see status conditions, restart count, started-at, and the runner-specific details.
7. Exec in for debugging
Section titled “7. Exec in for debugging”rune exec web sh# or against a specific instance:rune exec web-instance-a4f9d2 ls /etc/nginx8. Tear down
Section titled “8. Tear down”rune delete webOr stop without deleting (keeps spec, drops to 0 instances):
rune stop webrune scale web 2 # bring it back laterWhat you’ve used so far
Section titled “What you’ve used so far”| Command | What it did |
|---|---|
rune lint | Validated YAML. |
rune cast | Applied the spec. |
rune get | Read service and instance state. |
rune health | Inspected liveness probes. |
rune logs | Tailed container output. |
rune scale | Changed desired replica count. |
rune exec | Ran a shell inside an instance. |
rune delete | Removed the service. |
Where next
Section titled “Where next”- Use secrets & configmaps — same nginx, but with real config.
- Health checks — designing probes that don’t lie.
- Scale & restart — gradual rollouts.