Update pod spec without triggering a rollout

2/24/2019

Our current architecture includes several deployments with state, a single replica and a Recreate strategy. Due to this, any rollout of said resources causes downtime. I'm working on rectifying this, but in the meantime, any update to the pod spec of these deployments results in downtime for our app.

Is it possible to update the pod spec of a deployment without triggering a rollout? Specifically, I want to add some tolerations to said Deployments, without a rollout being triggered.

Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.3", GitCommit:"721bfa751924da8d1680787490c54b9179b1fed0", GitTreeState:"clean", BuildDate:"2019-02-01T20:08:12Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"10+", GitVersion:"v1.10.11-gke.1", GitCommit:"5c4fddf874319c9825581cc9ab1d0f0cf51e1dc9", GitTreeState:"clean", BuildDate:"2018-11-30T16:18:58Z", GoVersion:"go1.9.3b4", Compiler:"gc", Platform:"linux/amd64"}
-- Jonathan Mosenkis
kubernetes

1 Answer

2/28/2019

As per documentation

A Deployment’s rollout is triggered if and only if the Deployment’s pod template (that is, .spec.template) is changed, for example if the labels or container images of the template are updated. Other updates, such as scaling the Deployment, do not trigger a rollout.

What is the reason behind having a single replica?

Using Rolling Update Deployment strategy you can specify maxSurge and scale up your deployment during rollout and scale it down once completed.

-- A_Suh
Source: StackOverflow