skip to Main Content

I have the following scenario:

  1. A StatefulSet with 1 replica
  2. Update the template section and scale it in the same operation using helm as application manager
  3. The order of operation is the following:
    1. Scaling to 3
    2. Update the replica with name 0

Because I cannot control to first update and after that scale, I am losing data because there is a specific logic in the new statefulset template.

Is there a way to control the ordering of those operations?

The service in question is Redis, we are trying to get from standalone mode (1 replica) to replication(HA) without losing data.

2

Answers


  1. Chosen as BEST ANSWER

    For the moment I resolved the problem using a helm pre-install job that is basically scaling the sts to zero, after that helm is coming with the update.


  2. I am not Redis expert, but I think that solution below should help you.

    I would try to install another Redis HA instance (B) next to the existing one (A), taking as a data source for B a snapshot of A’s PV. This could to avoid losing your data. For more information you can read more about volume snapshots.

    See also this related problem.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search