Skip to content

Instantly share code, notes, and snippets.

@discordianfish
Created May 25, 2017 11:51
Show Gist options
  • Save discordianfish/bcec7691b0ef9e25bf989cafabcb0fce to your computer and use it in GitHub Desktop.
Save discordianfish/bcec7691b0ef9e25bf989cafabcb0fce to your computer and use it in GitHub Desktop.
k8s: Upgrade StatefulSet
  1. modify your container so you can signal it somehow to disable writes
  2. update the containers with that change
  3. copy existing stateful set and give it a new name
  4. create a new stateful set from that
  5. for each replica
    1. exec into old container, stop writes
    2. exec into new container, stop writes
    3. copy over data
    4. enable writes in new container
  6. delete old stateful set
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment