Scale & restart
Three commands cover most lifecycle work: scale, restart, stop. They wrap the same underlying reconciler, so they’re safe to chain.
Immediate scale
Section titled “Immediate scale”rune scale api 5The 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:
rune scale api 5 --no-waitGradual scale
Section titled “Gradual scale”When ramping a stateful or memory-hungry service, step up:
rune scale api 10 --mode=gradual --step=2 --interval=30sThis adds 2 instances every 30 seconds until you hit 10. If any step fails health checks, the operation aborts.
| Flag | Default | Notes |
|---|---|---|
--mode | immediate | immediate or gradual. |
--step | 1 | Instances added/removed per step. |
--interval | 30s | Time between steps. |
--rollback-on-fail | true | Revert to previous scale on health failure. |
Restart
Section titled “Restart”restart scales to 0 then back to the previous scale:
rune restart apiUse 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).
rune stop apiStops without deleting — desired scale becomes 0, the spec stays. Bring it back with rune scale api N or another cast.
Failure handling
Section titled “Failure handling”By default, scale operations roll back on health failure. To pin the new scale even if some instances fail to come up:
rune scale api 10 --rollback-on-fail=falseUse this only when you know the service is fine and you’d rather see partial progress than revert.
Inspecting a scale operation
Section titled “Inspecting a scale operation”rune get service api -o yaml | grep -A5 statusStatus 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.
Common patterns
Section titled “Common patterns”# Drain a service for maintenancerune stop api
# Bring it back to 3rune scale api 3
# Restart after rotating a secretrune restart api
# Slow ramp of a worker poolrune scale workers 50 --mode=gradual --step=5 --interval=1mAnti-patterns
Section titled “Anti-patterns”- Scaling instead of restarting.
rune scale api 0 && rune scale api 3works but is awkward — userune restart api. - Forgetting
--no-waitin CI scripts when you don’t actually want to block. - Setting
--rollback-on-fail=falseby default to “make scaling faster.” If health is flapping, you want the rollback. Fix the probes.