3

I have a stateful set of pods, and due to the stateful nature of them one of them cannot be recreated due to some state error that deleting it wouldn't help.

Since it's a stateful set kubernetes will block creation of additional pods until it's able to get the stuck one running. Statefulsets has podManagementPolicy: "Parallel" but it cannot be changed in runtime.

The question is if there's a way to make kubernetes skip the stuck one?

ApriOri
  • 2,618
  • 29
  • 48

1 Answers1

2

I belive you are looking for a WA for an known issue which is still open

StatefulSet will continue to wait for the broken Pod to become Ready (which never happens) before it will attempt to revert it back to the working configuration.

In term of upgrade found this on git hub below from official doc

The Pods in the StatefulSet are updated in reverse ordinal order. The StatefulSet controller terminates each Pod, and waits for it to transition to Running and Ready prior to updating the next Pod.

Note that, even though the StatefulSet controller will not proceed to update the next Pod until its ordinal successor is Running and Ready, it will restore any Pod that fails during the update to its current version. Pods that have already received the update will be restored to the updated version, and Pods that have not yet received the update will be restored to the previous version. In this way, the controller attempts to continue to keep the application healthy and the update consistent in the presence of intermittent failures.

Read Forced Rollback

When using Rolling Updates with the default Pod Management Policy (OrderedReady), it’s possible to get into a broken state that requires manual intervention to repair.

DT.
  • 3,351
  • 2
  • 18
  • 32