Recreate Deployment: Downtime for a Clean Slate

The Recreate strategy is like flipping a switch: it shuts down all old pods before starting new ones. This guarantees downtime but is necessary for breaking changes, like a database migration. The footgun is a failed deployment leaves you with no running app.
Why it exists
Some application updates introduce breaking changes. If a new version of your code requires a database schema that the old version can't read, running both simultaneously would cause errors. The Recreate strategy solves this by ensuring only one version is ever active, preventing conflicts.
The mental model
Think of it as replacing a car's engine. You can't drive the car while the old engine is being removed and the new one is being installed. The car is completely out of service during the procedure. Similarly, the Recreate strategy takes the application completely offline to perform the update.
How it works
When you trigger a deployment with the Recreate strategy, Kubernetes first scales the ReplicaSet managing the old pods down to zero. This terminates all running instances of your application. Only after all old pods are gone does it create a new ReplicaSet and scale it up, launching the new version of your pods. The service is unavailable from the moment the old pods are terminated until the new pods are up and ready to receive traffic.
When to use it
Use this strategy in development environments for quick updates or in production for applications that can tolerate planned downtime. It's the correct choice when deploying breaking, non-backward-compatible changes, especially those involving data schema migrations or other stateful components where old and new versions cannot coexist.
When not to use it
Avoid this strategy for any high-availability, user-facing service that requires zero downtime. Strategies like RollingUpdate or Blue-Green are designed for those scenarios. If a deployment fails, Recreate leaves you with no running application, making recovery more stressful and manual than with other strategies.
One canonical example
You are updating an e-commerce backend. The new version changes the orders database table, adding a required tracking_id column. The old code doesn't know about this column and would fail on writes. Using Recreate, you take the service down, apply the database migration, and then deploy the new code that understands the new schema. This prevents data corruption.
Interview question
For which scenario is the Kubernetes Recreate deployment strategy the most appropriate choice?
- a.Introducing a new database schema that is incompatible with the existing application version.Correct
- b.Ensuring that users experience no service interruption during the update process.
- c.Deploying a critical, user-facing service that requires continuous availability.
- d.Gradually updating an application to minimize the impact of potential bugs.
Why? this is the answer
Option A is correct because the Recreate strategy is specifically designed for updates with breaking changes, such as database schema migrations, where old and new versions cannot coexist. Option B is incorrect because the Recreate strategy explicitly guarantees downtime, making it unsuitable for scenarios requiring no service interruption.
Just read this? Test yourself on what you have been reading.
Read the original → kubernetes.io
Put your scrolling time to good use
Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on kubernetes — each one lists the topics its interview covers.
See open roles