Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not use Rolling Update strategy on deployments for stateful apps #24

Closed
onedr0p opened this issue May 29, 2023 · 5 comments · Fixed by #28
Closed

Do not use Rolling Update strategy on deployments for stateful apps #24

onedr0p opened this issue May 29, 2023 · 5 comments · Fixed by #28
Assignees

Comments

@onedr0p
Copy link

onedr0p commented May 29, 2023

This will bring up a new pod before the old one is destroyed which can lead to data corruption on the persistence data with stateful applications.

Use a deployment strategy of Recreate instead, this will destroy the old pod before the new one starts.

Another option is to use statefulsets instead of deployments for stateful workloads.

@onedr0p onedr0p changed the title Do not use Rolling Update strategy on deployments Do not use Rolling Update strategy on deployments for stateful apps May 29, 2023
@KyleTryon
Copy link
Collaborator

Thank you for this! I have gotten lucky so far, one user mentioned that file locking on the local volume mount might be the reason this has been working so far.

Going to look into statefulsets and see if there is maybe anything we can do to bring back rolling updates at some point.

@KyleTryon KyleTryon self-assigned this May 30, 2023
@onedr0p
Copy link
Author

onedr0p commented May 30, 2023

Deployments with the Recreate strategy is probably the most universal use for your users here who seems to be mostly docker-compose migrants. Feel free to pick my brain more if needed, I've been using containers for ~8 years and Kubernetes for ~5 years and my $dayJob is a Senior SRE.

@KyleTryon
Copy link
Collaborator

Thanks @onedr0p! I've checked out your repos and can see you've definitely got this all figured out 🙇. I can tell im going to be reading through your repos for a while.

@onedr0p
Copy link
Author

onedr0p commented May 30, 2023

definitely got this all figured out

At the same time I feel like I have no idea what I am doing 😆

@onedr0p
Copy link
Author

onedr0p commented May 30, 2023

If you're interested check out this discord, lots of people doing the home k8s goodness. It could be a good place to bounce ideas off of.

https://discord.gg/k8s-at-home

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants