1

Currently, I am migrating one of our microservice from K8S Deployment type to StatefulSets. While updating Kubernetes deployment config I noticed StatefulSets doesn't support revisionHistoryLimit and minReadySeconds.

  1. revesionHistoryLimit is used keep previous N numbers of replica sets for rollback.
  2. minReadySeconds is number of seconds pod should be ready without any of its container crashing.

I couldn't find any compatible settings for StatefulSets.

So my questions are: 1) How long master will wait to consider Stateful Pod ready? 2) How to handle rollback of Stateful application.

2 Answers 2

1
  1. After reverting the configuration, you must also delete any Pods that StatefulSet had already attempted to run with the bad configuration. The new pod will automatically spin up with correct configuration.
1
  1. You should define a readiness probe, and the master will wait for it to report the pod as Ready.
  2. StatefulSets currently do not support rollbacks.
1
  • That's what I expected. It does create some abnormalities in our Deployment framework. Do you know if there any efforts to support this in future? Commented Nov 7, 2017 at 20:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.