Choose an update strategy
The update strategy controls how Orchard replaces an app’s pods when you deploy a new version, which decides whether visitors see any downtime. Most apps keep the default, Rolling. Change it when an app cannot run two versions at the same time, or when you want traffic to move only after every new pod is ready.
| Strategy | CLI value | Behavior |
|---|---|---|
| Rolling | rollingupdate | New pods start before old pods stop. |
| Recreate | recreate | All pods stop first. The app has brief downtime. |
| Blue/green | bluegreen | Traffic moves to new pods when the new pods are ready. |
Apps with storage must use Recreate. The other strategies are not available for those apps.
Prerequisites
Section titled “Prerequisites”- Edit access to the project.
Change the strategy
Section titled “Change the strategy”- Open the app.
- Go to Settings > Deploy behavior.
- In Updates, select a Strategy.
Orchard saves the change immediately. The new strategy applies to the next deploy.
orchard deploy strategy set <id> --type bluegreenKeep pods ready during a node drain
Section titled “Keep pods ready during a node drain”Keep ready during a drain sets how many pods stay ready when a node drains. This setting creates a Kubernetes PodDisruptionBudget.
- Open the app.
- Go to Settings > Deploy behavior.
- In Updates, set Keep ready during a drain.
Orchard saves the change immediately.
The setting takes effect when the app has more replicas than the value. If you set the value to 0, a drain can take all pods down at the same time.
Related resources
Section titled “Related resources”- Scale an app and set resources - Run more replicas so that a rolling update keeps serving traffic.
- Roll back an app - Return an app to an earlier release.
orchard deploy strategyreference - Every flag of theorchard deploy strategycommands.