Skip to content

Scale & restart

Three commands cover most lifecycle work: scale, restart, stop. They wrap the same underlying reconciler, so they’re safe to chain.

Terminal window
rune scale api 5

The reconciler creates or destroys instances until 5 are running and healthy. The CLI blocks until rollout completes (or the timeout — --timeout=5m by default).

Don’t wait:

Terminal window
rune scale api 5 --no-wait

When ramping a stateful or memory-hungry service, step up:

Terminal window
rune scale api 10 --mode=gradual --step=2 --interval=30s

This adds 2 instances every 30 seconds until you hit 10. If any step fails health checks, the operation aborts.

FlagDefaultNotes
--modeimmediateimmediate or gradual.
--step1Instances added/removed per step.
--interval30sTime between steps.
--rollback-on-failtrueRevert to previous scale on health failure.

restart scales to 0 then back to the previous scale:

Terminal window
rune restart api

Use it after editing a configmap or rotating a secret — mounted files don’t hot-reload, but a restart picks them up.

For zero-downtime rolling restarts, use a runeset upgrade with rolling update settings (Release 2 — not yet available; for now, restart is a stop-the-world operation per service).

Terminal window
rune stop api

Stops without deleting — desired scale becomes 0, the spec stays. Bring it back with rune scale api N or another cast.

By default, scale operations roll back on health failure. To pin the new scale even if some instances fail to come up:

Terminal window
rune scale api 10 --rollback-on-fail=false

Use this only when you know the service is fine and you’d rather see partial progress than revert.

Terminal window
rune get service api -o yaml | grep -A5 status

Status fields you’ll see during a scale:

  • desiredReplicas — what you asked for.
  • readyReplicas — instances passing readiness.
  • currentReplicas — instances that exist (may not be ready).
  • lastScaleAt, lastScaleReason.
Terminal window
# Drain a service for maintenance
rune stop api
# Bring it back to 3
rune scale api 3
# Restart after rotating a secret
rune restart api
# Slow ramp of a worker pool
rune scale workers 50 --mode=gradual --step=5 --interval=1m
  • Scaling instead of restarting. rune scale api 0 && rune scale api 3 works but is awkward — use rune restart api.
  • Forgetting --no-wait in CI scripts when you don’t actually want to block.
  • Setting --rollback-on-fail=false by default to “make scaling faster.” If health is flapping, you want the rollback. Fix the probes.