Understanding StatefulSets in Kubernetes



Subscribe to show your support! https://goo.gl/1Ty1Q2 .
Patreon 👉🏽http://patreon.com/marceldempers

Today’s video is all about StatefulSets and how they help us to run workloads that require persistence. These can include databases, caches, message queues and anything that requires data to be stored. Stay tuned for my video on persistent volumes as it will also play a big role in managing and running stateful workloads on Kubernetes. If you are new to Kubernetes, check out my getting started playlist on Kubernetes below 🙂

Also if you want to support the channel further, become a member 😎
https://marceldempers.dev/join

Checkout “That DevOps Community” too
https://marceldempers.dev/community

Checkout the source code below and follow along 🙂

If you’re interested in learning more about Kubernetes, checkout my series below:

Kubernetes Guide for Beginners:
—————————————————

Kubernetes Monitoring Guide:
———————————————–

Kubernetes Secret Management Guide:
————————————————————–

Like and Subscribe for more 🙂

Source Code
————————————————————–
https://github.com/marcel-dempers/docker-development-youtube-series

Follow me on socials!
https://marceldempers.dev
Twitter | https://twitter.com/marceldempers
GitHub | https://github.com/marcel-dempers
Facebook | http://fb.me/thatdevopsguy
LinkedIn | https://www.linkedin.com/in/marceldempers
Instagram | https://www.instagram.com/thatdevopsguy

Music:
Track: Johny Grimes – Levity | is licensed under a Creative Commons Attribution licence (https://creativecommons.org/licenses/by/3.0/)
Listen: https://soundcloud.com/johny-grimes/levity-1

Track: Loxbeats – Surface | is licensed under a Creative Commons Attribution licence (https://creativecommons.org/licenses/by/3.0/)
Listen: https://soundcloud.com/loxbeats/surface

Track: Amine Maxwell – Le Soir | is licensed under a Creative Commons Attribution licence (https://creativecommons.org/licenses/by/3.0/)
Listen: https://soundcloud.com/aminemaxwell/le-soir

Track: Sappheiros – Willow | is licensed under a Creative Commons Attribution licence (https://creativecommons.org/licenses/by/3.0/)
Listen: https://soundcloud.com/sappheirosmusic/willow

Track: souKo – souKo – Parallel | is licensed under a Creative Commons Attribution licence (https://creativecommons.org/licenses/by/3.0/)
Listen: https://soundcloud.com/soukomusic/parallel

source

45 thoughts on “Understanding StatefulSets in Kubernetes”
  1. Thanks to you, I learned a lot of "production / professional" ways to understand and implement those strategies. None of your videos get bored, I even watch some vid 5-6 times to strengthen my knowledge until I completely understand everything. Thank you for your supports.

  2. StatefulSets are an interesting beast. When I first ran into them, I didn't know what to make of it : I've always thought of k8s as stateless-oriented and StatefulSets felt like an anti-pattern. Once I looked into clustered / high availability databases and the on-going work in that space, it made a lot more sense (I'm a big fan of Stolon, if you're into distributed Postgres). K8s is really a great engine to distribute *stuff*, it doesn't have to be microservices.

  3. Hey, do you have a video describing how to make an EBS based StatefulSet in AWS? It seems that there's an issue reguarding EBS volumes being bound to an AZ. I heard that I should create an ASG per AZ, and make my StatefulSet have Pods across the AZs, but I don't know how to enforce that behavior. Most of my volumes are EFS and FSx so far, but I'd like to run a database in EKS, which would need EBS for speed, and I don't want to miss anything.

  4. just rewatched this…
    thinking I'm picking up on the complexity of stateful sets and … a stretched environment like multiple AZ's as present on AWS EKS… any chance you've done a video, where say 3 or more stateful sets are pined to nodes (AWS EKS Nodegroups).
    this can then be used against the Redis deployment and PostgreSQL deployment ?

  5. I am on the virtuous path of watching every single video of this channel. An practice it. So far it is going great and I have learned a ton.

  6. You are beautifully pumped man. But please don't jump so quick from example code to yourself.
    Nice videos. Thank you!!!

  7. definitely helped explain stateful sets and pv's snd pvc's… but now to map to real world… 2 AZ's on AWS with Prometheus deployed, with a ALB in front ?
    if the Prometheus servers were running on the same node I'd say lets use deployments, that way either node would have access to all the data, but then you going to have duplication where they scrape the same target.
    lets make it simpler. one prometheus server, running active in AZ1.. but it needs to be protected to be able to fail over to AZ2…
    snd as I discovered EFS not allowed.

  8. I think I said it in one of you first videos but again, you are the best DevOps educator on youtube. Clearly you've got experience that many others don't. Your vids aren't some robotic read-out of the official docs for views, so I can always find something new. Great style, great structure. You definitely deserve more recognition but it's getting there and certainly it will get there!

  9. Outstanding video mate. I'd say you are a welcome addition to our sunny shores but you chose VIC instead of WA 😛

    Just teasing Melbourne rocks, lived there for 4 years myself as a young lad.

  10. Hi Thanks for the brilliant content! Does the redis deployment automatically distribute across six note? If I have a taint on master nodes I guess that will be an issue? Cheers

  11. I don't know what I would do without your channel. You have an amazing skill to explain complicated topics in such a wonderful, easy-to-understand way. Keep going!!
    A video with Tekton would be great, if I can propose something.

  12. The way you explain concepts and then finish them with real world examples is what most engineers wish to see. Redis, RabbitMQ I have watched both and request you to deploy more such complex applications. Also, if you can tell us what could be the best setup for cluster monitoring and how to approach to solve real world cluster down scenarios, that would be great.

  13. Is it ok to use pod ip's for clustering? I think If pods get rescheduled their pod ip addresses will change and break the redis cluster.

  14. Not sure which is bigger, you biceps or your knowledge or your way of teaching.
    You are a complete package.

  15. Dude, I really like your efforts, I've learned alot. No offense but whenever I see you I think It's a murderer trying to teach k8s 😀

  16. Hello Marcel,

    Can you make a video based on DevOps security aspects ?.. Like all things to be considered when we think about security in CICD? Like as a hiring manager what all u think is important and relevant.

  17. Very Very helful vedio and was very easy to understand StatefulSet. Thanks you so much…

  18. Your video on the topic is excellent!! I would love to see more examples of statefulsets because your video has raised some critical issues about cluster failure which couldnt be automatically resolved by the kubernetes engine and may require manually fixing the cluster setup. Can you please show possible solutions on fixing cluster issues that cannot be automatically resolved by the k8s engine?

Leave a Reply

Your email address will not be published.

Captcha loading...