Deployment vs StatefulSet Kubernetes | Difference between Deployment and StatefulSet in Kubernetes

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ก.ย. 2024
  • In this video we actually looked into the difference between Deployment or StatefulSet Kubernetes resources. In the previous videos we have just talked about these resources but in this videos we actually discussed and saw how Deployment is not actually capable of running Stateful Distributed application and to run them we will have to use StatefulSets.
    Web :
    viveksingh.dev/
    Kubernetes in Action :
    www.manning.co...
    GitHub :
    github.com/viv...

ความคิดเห็น • 30

  • @farukabdullah2607
    @farukabdullah2607 3 ปีที่แล้ว

    very nice explanation .... who dislike this video .. ??

  • @adityapathak8556
    @adityapathak8556 3 ปีที่แล้ว +1

    Hey Vivek , amazing explanation, i do have one doubt , how data sync is happening between PVs here in statefulset?

    • @viveksinghggits
      @viveksinghggits  3 ปีที่แล้ว

      Hi Aditya,
      If I understood your question correctly, you are asking if we are running n replicas of a stateful application they would have n number of PVs, and in that case how the data is going to be synced between those PVs.
      This is the responsibility of the stateful application that is being run as statefulset. For example if you are running Cassandra as statefulset it's responsibility of Cassandra to manage the data between those volumes.
      I hope this makes sense, don't hesitate to ask any other questions if it was not clear.

  • @jayantatul7530
    @jayantatul7530 2 ปีที่แล้ว +2

    Brilliant .. I always find your videos really helpful and easy to understand. Thanks for all your hard work . God bless you !!

    • @viveksinghggits
      @viveksinghggits  2 ปีที่แล้ว

      Hi Jayant,
      Thank you for the kind words. I appreciate it.

  • @ubbais6233
    @ubbais6233 ปีที่แล้ว

    Great explanation. 💫

  • @sandeepkumarsahu3517
    @sandeepkumarsahu3517 2 ปีที่แล้ว

    Hello Vivek,
    are you provide persional training on kubernates ?

    • @viveksinghggits
      @viveksinghggits  2 ปีที่แล้ว

      Hi Sandeep,
      No. Even if I was providing the training this is the exact same material that I would have covered.
      And if you have some questions you can obviously either ask here or schedule a call with me, the link is on the website.

  • @Raviverma-gq8xm
    @Raviverma-gq8xm 3 ปีที่แล้ว

    very well explained, make some more videos

    • @viveksinghggits
      @viveksinghggits  3 ปีที่แล้ว

      Thanks Ravi,
      Sure, I will keep making them.

  • @sumitbhanse007
    @sumitbhanse007 ปีที่แล้ว

    If I use hostname and domain parameter in deployments then I can achieve static identity (hostname and fqdn) for my pods.

  • @sudhanshujain9372
    @sudhanshujain9372 4 ปีที่แล้ว +1

    Hi vivek,
    It was very informative session.
    I have one doubt.
    When pod deployed and managed by deployment having separate PVC and pv is deleted , you said that will need to be looked manually.
    I wanted to ask if it can't be managed by liveliness and readiness probes ?

    • @viveksinghggits
      @viveksinghggits  4 ปีที่แล้ว +1

      Hey Sudhanshu,
      What I actually meant is, if the the pod is being run independently or in other words are not being controlled through Deployment in that case if the Pod is deleted we will have to manually start the pod. Because the pod is not being run using Deployment it would not start automatically. So in that case the problem is if the pod is deleted somehow.
      If we talk about PV and PVC if the PV is being used by a pod using PVC, we would not be able to delete the PV.
      Let me know if this makes sense, otherwise we can discuss more.

    • @sudhanshujain9372
      @sudhanshujain9372 4 ปีที่แล้ว

      @@viveksinghggits Thanks vivek for reply. I got your point now.

    • @viveksinghggits
      @viveksinghggits  4 ปีที่แล้ว

      No problem 😀

  • @Amarjeet-fb3lk
    @Amarjeet-fb3lk 3 ปีที่แล้ว

    We can use persistance volume to store database data, then why stateful sets? If pod dies, we have volumes, that can be mounted in pods container again

    • @viveksinghggits
      @viveksinghggits  3 ปีที่แล้ว

      Hey Amarjeet,
      Did you watch the entire video and it didn't make sense?

  • @soumilkhandelwal4388
    @soumilkhandelwal4388 2 ปีที่แล้ว

    Hi Vivek, Great explanation, I have a doubt, let's say initially there were 3 pods in the Statefulset i.e. 3 PVC and PV, then we scaled it down to 2 pods, now the one PV and PVC is still there and the data is also there in that PV, what happens to that PV, I want to access its data how to get it? I don't know If my following doubts are correctly phrased, but I ll try :
    1. Do all the PVs synchronized? i.e. what about the replication?
    2. If each of the PV is replicated, then where are those replicas stored?
    3. The user wants to get the data that might be present in any of the PVs , how is the mater pod gonna get that data?
    I hope you got what I want to ask, It would be helpful if you could clear these doubts.

    • @viveksinghggits
      @viveksinghggits  2 ปีที่แล้ว +1

      Hi Soumil,
      That's a great question, unfortunately I don't have an answer to it.
      If data is replicated in that case, we will be able to get the data from the other pods as well. If data is sharded we might have a problem and I think it would depend on how application/database is written to handle this.
      I might be way off from actual answer so please read more about it.

    • @soumilkhandelwal4388
      @soumilkhandelwal4388 2 ปีที่แล้ว

      @@viveksinghggits cool, got it, thanks for reply

  • @aryakaushal5561
    @aryakaushal5561 3 ปีที่แล้ว

    Very nicely explained bhai! I literally made notes of all this!!

  • @lokingan
    @lokingan 3 ปีที่แล้ว

    Is there a version in english?

    • @viveksinghggits
      @viveksinghggits  3 ปีที่แล้ว

      The video is in English Lokson, if that is your concern.
      Did I misunderstand you?

    • @liveandlearn515
      @liveandlearn515 ปีที่แล้ว

      Hater..

  • @user-pq-b9w
    @user-pq-b9w 5 หลายเดือนก่อน

    hi Vivek, how we can contact you,

    • @viveksinghggits
      @viveksinghggits  5 หลายเดือนก่อน

      There is a link on my website to schedule a call with me.