Statefulsets | Deploying MongoDB cluster to Kubernetes

Поделиться
HTML-код
  • Опубликовано: 24 ноя 2024

Комментарии • 140

  • @naveenchebolu6757
    @naveenchebolu6757 5 месяцев назад +2

    This video clears all my doubts about statefulsets .Why this video not went viral.

  • @kaykay02120
    @kaykay02120 8 месяцев назад +1

    no one can give better explanation than this. kudos to you pavan

  • @dipi411
    @dipi411 8 месяцев назад +2

    Nice !Duration is short but every aspect of stateful set has been covered.

  • @edboss36
    @edboss36 2 месяца назад +1

    Mannn this is the best series on kubernetes. I'm binging all of it for Google Associate Cloud Engineer exam, thanks

  • @Amitkumar-bc4rt
    @Amitkumar-bc4rt Месяц назад +3

    I have seen instructors having millions subscribers but they are way behind what and how concept is explained in this video.

    • @t.bikash62
      @t.bikash62 Месяц назад

      Hands down to teaching skills.

  • @kreebo_
    @kreebo_ 2 года назад +9

    This content is amazing! You're so good at explaining and demo'ing. This helped me understand so much I did not fully grasp before. We need more in-depth content like this

    • @PavanElthepu
      @PavanElthepu  2 года назад

      Thank you so much Cheslyn. Please subscribe and share with your friends and colleagues

    • @liontechnologiessolutions8755
      @liontechnologiessolutions8755 Год назад

      ​@@PavanElthepuI could get you a tutoring job. For about 6 hours a week. Please get in touch

  • @aliasgar1648
    @aliasgar1648 2 месяца назад +2

    Brilliant series on k8s! I also watched the helm video which was super concise and super informative.

  • @saikrishnareddybandi8285
    @saikrishnareddybandi8285 Год назад +1

    Ultimate level of teaching 🙏🙏🙏

  • @aayush5474
    @aayush5474 Год назад +1

    Your channel has best kubernetes tutorials. Thanks a lot for this

    • @PavanElthepu
      @PavanElthepu  Год назад +1

      Thank you so much Ayush. Please subscribe and share with your friends and colleagues

    • @Amitkumar-bc4rt
      @Amitkumar-bc4rt Месяц назад

      please create videos on helm charts if possible

  • @neeharikagv2812
    @neeharikagv2812 Год назад +1

    This is so helpful. Concept and practicals in single video from end to end is amazing. Thank you so so much

  • @HarshaVardhan-mr2bw
    @HarshaVardhan-mr2bw Год назад +2

    was searching for this kind of video, thanks man, crystal clear from point to point, amazing, keep posting this content.

    • @PavanElthepu
      @PavanElthepu  Год назад

      Thank you so much HarshaVardhan. Please subscribe and share with your friends and colleagues

    • @HarshaVardhan-mr2bw
      @HarshaVardhan-mr2bw Год назад +1

      @@PavanElthepu Hey small doubt hope you could reply to this, how do we connect to the mongo compass from this replicaset, i tried the same method as the deployment, but it didnt work, hoping you could clarify this?
      Thanks

  • @chfr
    @chfr Год назад +2

    Good video, it explains the intricacies of stateful sets and headless services very well.

    • @PavanElthepu
      @PavanElthepu  Год назад

      Thank you so much. Please share with your friends and colleagues

  • @merlingrace6850
    @merlingrace6850 Месяц назад +1

    Thank You so much for this vedio. It clears all my doubts on Statefulset.

  • @vitusyu9583
    @vitusyu9583 9 месяцев назад +1

    Your presentation is clear and yet comprehensive. Thanks! I just subscribed to your channel to watch more on K8.

    • @PavanElthepu
      @PavanElthepu  9 месяцев назад

      Thank you so much. Please share with your friends and colleagues🙏

  • @MrPankajkr06
    @MrPankajkr06 4 месяца назад +1

    Best video on STS

  • @t.bikash62
    @t.bikash62 9 месяцев назад +1

    9 mins and straight searched the subscribe button!

    • @PavanElthepu
      @PavanElthepu  9 месяцев назад

      Means a lot. Please share with all your friends and colleagues

  • @janvidalal476
    @janvidalal476 10 месяцев назад +2

    Your videos are GOLD!! 🎉

    • @PavanElthepu
      @PavanElthepu  10 месяцев назад

      Thank you so much🙂. Please share with your friends and colleagues

  • @pavangrandhi
    @pavangrandhi 4 месяца назад +1

    Thanks a lotttt sir!
    I was struggling since 2 weeks for this code, tried multiple GPT tools as well, but couldnt help.
    Your video and code is a One Stop solution for all my StatefulSets and Mongodb issues.
    Thank you thank you thank you very much!!!

    • @ValidUserName-fl3uh
      @ValidUserName-fl3uh 4 месяца назад

      Why would you run db in kubernetes, when you have managed dbs so cheap

  • @umeshsaini3109
    @umeshsaini3109 Год назад +1

    Again appreciated bro!! You have explained everything in detail. I wish I could have come on this channel earlier.

  • @ye__in
    @ye__in Год назад +1

    Amazing amazing amazing!! Most helpful K8S video so far! Thank you so much

    • @PavanElthepu
      @PavanElthepu  Год назад

      Thank you so much. Please subscribe and share with your friends and colleagues

  • @marcikaist
    @marcikaist Год назад +3

    The explanation was very clear but I have a little problem, can you help me please? The first pod is created successfully, but at athe second pod I get the following message:
    Warning FailedScheduling 3m35s default-scheduler 0/1 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/1 nodes are available: 1 No preemption victims found for incoming pod..
    Normal NotTriggerScaleUp 2m46s cluster-autoscaler pod didn't trigger scale-up:

  • @krushnabhanage5780
    @krushnabhanage5780 2 года назад +3

    You made it easy to understand, was really helpful. Keep up!!!!

    • @PavanElthepu
      @PavanElthepu  2 года назад

      Glad that it helped you Krushna. Please share with your friends and colleagues

  • @vishalmishra176
    @vishalmishra176 2 года назад +2

    You kept it simple. Very helpful. Thank you.

    • @PavanElthepu
      @PavanElthepu  2 года назад +1

      Thank you Vishal. Please share it with your friends and colleagues

  • @TC-kt7pp
    @TC-kt7pp 11 месяцев назад +1

    Thank you this video helped me a lot, in fact you're all videos are great to understand easily.

    • @PavanElthepu
      @PavanElthepu  11 месяцев назад

      Thank you so much. Please subscribe and share with your friends and colleagues

  • @WICKED21SUNNY
    @WICKED21SUNNY Месяц назад +1

    very well explained video

  • @jalandharbehera2456
    @jalandharbehera2456 2 года назад

    Really sir....no words for you 🙏🙏 I already have share your most the videos because all should know you and your channel and that helps them most 🙏🙏🙏

    • @PavanElthepu
      @PavanElthepu  2 года назад

      Thank you so much Jalandhar for your love🙏

  • @ruptamsadhukhan7834
    @ruptamsadhukhan7834 Год назад +1

    Hey Pavan,
    Nice Explanation!!!
    I need to implement this using postgres.

    • @PavanElthepu
      @PavanElthepu  Год назад

      Yes, you can use same concept with PostgreSQL

  • @brontelobo
    @brontelobo 3 месяца назад +1

    Wonderful presentation. Thank you!

  • @cloudpillsdaily
    @cloudpillsdaily 10 месяцев назад +2

    more than gold
    thank you so much

  • @Mahakal_Status_g6y
    @Mahakal_Status_g6y 2 месяца назад +1

    Awesome bro 🔥

  • @sivakrishna-hk2un
    @sivakrishna-hk2un Год назад +1

    requesting you to Please make videos on kubernetes troubleshooting means errors and their solutions

  • @libintomirl
    @libintomirl 8 месяцев назад

    Thanks a mil Pavan. A quick question. How to automate the manual efforts that are involved, like adding the replicas details to the primary pod always when the pod re-schedules or enabling the secondary pod to allow read operations when ever the pods are scaled ?

  • @sagarasgr
    @sagarasgr 11 месяцев назад +1

    Great tutorial 💯

  • @taiz2908
    @taiz2908 2 года назад +1

    Nice explanation 👌🏻 Waiting for you to upload more videos

    • @PavanElthepu
      @PavanElthepu  2 года назад +1

      Thanks you Taizun. Please share it with your colleagues and friends

    • @taiz2908
      @taiz2908 2 года назад +1

      @@PavanElthepu sure..

  • @thangapandianm7862
    @thangapandianm7862 8 месяцев назад

    Thanks Pavan. it's really helpful. if I need to restart the mongoDB password then what should I do.

  • @jyothsnabethavalli9599
    @jyothsnabethavalli9599 Год назад +1

    Great tutorial

  • @dummymail6029
    @dummymail6029 8 месяцев назад +1

    great video thanks pavan :)

    • @PavanElthepu
      @PavanElthepu  8 месяцев назад

      Looks like you are watching all my videos today🙂. I have received your comments on many videos

    • @dummymail6029
      @dummymail6029 8 месяцев назад

      @@PavanElthepu yes i'm justing completing the playlist, since tomorrow there is an interview just referring all your video thank you so much for your clear explanation of concepts

  • @raghuvardhansaripalli9636
    @raghuvardhansaripalli9636 Год назад

    Superb k8s series Pavan. Simple, crisp and clear with the content. I am following your series with handson. and all are working as you explained in videos. I shared your videos with my friends.
    I wish you to make more such videos and become popular in youtube with good growth.
    May i know your plan for the next series.? God bless you !!!

    • @PavanElthepu
      @PavanElthepu  Год назад

      Thanks for the love Raghu Vardhan. These words really motivates me to create so much of content. Yeah, plan Git, GitOps, ArgoCD, Terraform, General Software Development/Design concepts, Kafka, Redis, SpringBoot, and many more.
      This would be a FullStack channel, not just DevOps!

    • @raghuvardhansaripalli9636
      @raghuvardhansaripalli9636 Год назад

      @@PavanElthepu Superb Pavan. thanks for the headsup. i have subscribed your channel. by the way when i execute the comman "k exec -it mongo-0 -- mongo
      ". I am getting below error.
      OCI runtime exec failed: exec failed: unable to start container process: exec: "mongo": executable file not found in $PATH: unknown
      How to resolve this error. Can you please tell me Pavan.
      GOD BLESS YOU !!!

    • @Mohammed-co3ux
      @Mohammed-co3ux Год назад +1

      Hey buddy I have been into devops for quite some time now. This video is a gateway for many who make it hard to understand statefulset.. Way to go..

  • @VũSeven
    @VũSeven 29 дней назад +1

    How we create storageclass : demo-storage. Is this local disk?

  • @gokhunyayla
    @gokhunyayla Год назад

    very good video, most helpful one. Now can you please tell me how can I connect via mongodb compass to the mongodb database that has this statefulset setup in GKE

  • @parimalaprao
    @parimalaprao 7 месяцев назад

    Can you please make a tutorial on k8s certificates?? Why, how and when of those certificates?

  • @libintomirl
    @libintomirl 8 месяцев назад

    Thanks a mil Pavan. Just a quick question. do we have to always manually configure the secondary nodes to accept read requests when we scale up the pods ? or adding replica details manually to the primary pod if the pod rescheduled? what is the other way to get these manual process automated ?

  • @walkerstark9584
    @walkerstark9584 Год назад +1

    😭😭😭😭😭😭😭😭😭 You're the Best bro

    • @PavanElthepu
      @PavanElthepu  Год назад

      Ha ha🙂. Thank you so much. Please subscribe and share with your friends and colleagues

    • @walkerstark9584
      @walkerstark9584 Год назад +1

      @@PavanElthepu Done

  • @andrevieira997
    @andrevieira997 10 месяцев назад

    Hello Pavan,
    Many thanks for sharing your knowledge. :)
    I just have a question, how can I connect to my mongo db cluster outside of the Kubernetes? Using a Mongo GUI like Compass.
    Can you help?
    Thank you.

  • @navyabhanuchaganti6718
    @navyabhanuchaganti6718 Год назад +1

    Nice explanation wid figure 👍

    • @PavanElthepu
      @PavanElthepu  Год назад

      Thank you Navya. Please subscribe and share with your friends and colleagues

  • @MANOHARANTULASINGAM
    @MANOHARANTULASINGAM 29 дней назад

    Hi Pavan, what is the point in having slave pods in statefulset when all the requests are directed to master pod only?

  • @manasas9671
    @manasas9671 Год назад

    Thank you for the video, How can we configure master and slave in Mysql Database

  • @rajangarg
    @rajangarg 2 года назад +1

    Thanks for the simplified explanation.
    I want to know is there any other condition apart from authentication which can make an application stateful?

    • @PavanElthepu
      @PavanElthepu  2 года назад

      Doesn't matter, anything that you store for future usage makes an application Stateful. Examples: Redis, all DBs, all message brokers, etc..

  • @satyasuvartha8595
    @satyasuvartha8595 23 дня назад +1

    can you do the same on postgress databases please it may help most of students please please please consider

  • @rajeshdheenan9913
    @rajeshdheenan9913 11 месяцев назад

    Hi Pavan,
    In non-Statefulsets Mongo pod with 4 replication factor. While user fetching the query in mongo db, how the services select which pod to select the data to the user. How it select which pod to select? Could you please explain it briefly.
    Thank You.

  • @pavankongara792
    @pavankongara792 Год назад +1

    amazing!

  • @swapnilgawade9048
    @swapnilgawade9048 2 года назад +1

    Its very helpful, thank you!!
    Can you please share the link of manifest files?

    • @PavanElthepu
      @PavanElthepu  2 года назад

      Updated the description with manifest link Swapnil. Glad that it helped you, kindly share the video with your colleagues and friends.

  • @SusmithaNikhil
    @SusmithaNikhil Год назад

    how do we configure the mongocompass to access the replicaset from internet

  • @aliasgar1648
    @aliasgar1648 2 месяца назад +1

    Thanks

    • @PavanElthepu
      @PavanElthepu  2 месяца назад +1

      Thank you so much for the support @aliasgar

  • @yashkinra7033
    @yashkinra7033 Год назад +1

    loved it

  • @rahulpardeshi56
    @rahulpardeshi56 11 месяцев назад

    How to take backup of DB deployed using Statefulsets in K8s CLuster??

  • @eugenmalatov5470
    @eugenmalatov5470 Год назад

    Really amazing, thanks a lot!

    • @PavanElthepu
      @PavanElthepu  Год назад

      Thank you so much, please subscribe and share with your friends and colleagues

  • @maheshkumarnaik754
    @maheshkumarnaik754 11 месяцев назад +1

    Nice sir

    • @PavanElthepu
      @PavanElthepu  11 месяцев назад

      Thank you Mahesh. Please subscribe and share with your friends and colleagues

  • @abhinavkumar2099
    @abhinavkumar2099 2 года назад +1

    superb

    • @PavanElthepu
      @PavanElthepu  2 года назад

      Thank you Abhinav. Please share with your friends and colleagues

  • @mrnikhil4898
    @mrnikhil4898 Год назад

    Hi Sir,
    Can the replication algorithm mentioned in the video be applied for mysql pods?

  • @najibiziki4070
    @najibiziki4070 2 года назад +1

    hello,
    first thank you very much for this simple tutorial is clear.
    I have a question, and I hope you can help me with this problem.
    when i deploy mongodb with statefulsets , and i have deploy my server side , express js with deploy .
    in this case i have a primitive and secondary db.
    how i can conect mongodb your express so i can write in primitive and read from secondary db .
    in this pon where i am blocked, can you help me please

    • @PavanElthepu
      @PavanElthepu  2 года назад

      Hi Najib, you can give read preference in connection string or in your code while doing database operations.

  • @jyothsnabethavalli9599
    @jyothsnabethavalli9599 Год назад

    Any video on mysql data replication please help and share any link please

  • @Rohit-kx6ps
    @Rohit-kx6ps 2 месяца назад

    how can i connect with mongo compass?

  • @shourovroy-sanatani
    @shourovroy-sanatani 7 месяцев назад

    how to expose this for mongodb compass?

  • @himaniupadhyay4u
    @himaniupadhyay4u Год назад

    Suppose we are creating a DB using StatefulSet object and we have masterNode-0 and slaveNode-1/2. If masterNode-0 goes down, will any slaveNode become master node or the whole service will stop responding to incoming request until masterNode comes-up?

    • @harshupadhyay2032
      @harshupadhyay2032 Год назад

      Have you got the answer, because I too am searching for the same

    • @godfreyifeanyi3965
      @godfreyifeanyi3965 5 месяцев назад

      If the Master Node goes down an election is held between the secondary nodes and new Primary node is elected. Also if the failed primary node recreates and comes back it becomes a secondary node.

  • @amitkumdixit
    @amitkumdixit 2 месяца назад

    What happen is primary goes down

  • @sriramakrishnas9248
    @sriramakrishnas9248 Год назад +1

    Hi This video is really awesome which made our lives easy...when try to deploy the statefulset with above scripts, we getting below error here.. We have used the same files in the repo for secrets,sc,pv,pvc and config..
    default-scheduler 0/1 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/1 nodes are available: 1 No preemption victims found for incoming pod..
    Normal Scheduled 98s default-scheduler Successfully assigned default/mongo-0 to minikube
    Warning FailedMount 66s (x7 over 98s) kubelet MountVolume.SetUp failed for volume "mongodb-config" : configmap "mongodb-config" not found
    Normal Pulling 33s kubelet Pulling image "mongo:4.0.8".. I
    any information will be helpful..

    • @PavanElthepu
      @PavanElthepu  Год назад

      Thank you Sri Rama Krishna. It’s saying that configmap not found

    • @sriramakrishnas9248
      @sriramakrishnas9248 Год назад +1

      @@PavanElthepu Thanks Pavan..

    • @sriramakrishnas9248
      @sriramakrishnas9248 Год назад

      Hi Pavan.. Thanks for your time. can we create a mongodb instance with single replicaset .will that serves our purpose for read & write operations...How we need to do the replica setup for single pod..?

  • @thiagoacsoares
    @thiagoacsoares Год назад

    Good evening, access to mongodb is occurring without a password. mongodb is not asking for username and password.

  • @subbareddyjangalapalli6310
    @subbareddyjangalapalli6310 Год назад

    Hello Pavan, getting error after statefulsets deployed with mango-0 "exec failed: container_linux.go:380: starting container process caused: exec: \"mongo\": executable file not found in $PATH"" - can you help to throw some light.

    • @PavanElthepu
      @PavanElthepu  Год назад +1

      Did you use same manifest?

    • @subbareddyjangalapalli6310
      @subbareddyjangalapalli6310 Год назад +1

      @@PavanElthepu Thank you for quick reply Pavan. I'm good with image:4.0.8 no issues as you mentioned in your yaml file, where as if I use latest image, can you do post for latest image

    • @PavanElthepu
      @PavanElthepu  Год назад +1

      @@subbareddyjangalapalli6310 sure, I'll try

  • @denkoech8712
    @denkoech8712 Год назад

    how do you replication automatically
    if you have enabled HPA?

    • @PavanElthepu
      @PavanElthepu  Год назад

      There are multiple ways of doing this like using Operator, adding a sidecar container, etc..

  • @ShourovRoy-pk5zm
    @ShourovRoy-pk5zm 7 месяцев назад

    Not working. And how to access from external?

  • @jitendernegi9074
    @jitendernegi9074 Год назад

    1 Question : You said replication of data is not enabled by default . so if I scale the statefulset to one more pod , do I need to run the rs.initiate{} command again in the master pods with the dns of the new pod ??

    • @PavanElthepu
      @PavanElthepu  Год назад

      Yes. There are multiple ways of doing this like using Operator, adding a sidecar container, etc..

    • @jitendernegi9074
      @jitendernegi9074 Год назад +1

      @@PavanElthepu thanks for the prompt response . The video is really very informative

    • @PavanElthepu
      @PavanElthepu  Год назад +1

      Thank you Jitender. Please subscribe and share with your friends and colleagues

    • @eugenmalatov5470
      @eugenmalatov5470 Год назад

      @@PavanElthepu Follow-up question. The fact that you need to exec specifically into a pod to run some commands and initiate the "replication/synchronization". Does that mean that things need to be redone (exec + scripts) every time when some pods go down and reboots (because the IP will change and all that)? This would defeat this auto-repair property of Kubernetes.

    • @PavanElthepu
      @PavanElthepu  Год назад +1

      It doesn't, as that script execution is automated on every pod creation

  • @bharath4195
    @bharath4195 Год назад

    what do you suggest deployment or statefulset ?

    • @PavanElthepu
      @PavanElthepu  Год назад +1

      I depends on your application. If you’re storing any state, the go for statefulset. If there is no state needed, go with deployment

  • @siddharthgaur6854
    @siddharthgaur6854 Год назад

    @pavan: How to self host typesense on K8 cluster using deployment.yaml

    • @PavanElthepu
      @PavanElthepu  Год назад

      Typesense should be deployed using Statefulset as it’s a stateful application.

  • @roopesh668
    @roopesh668 Год назад

    So, If 1 replica of mongodb is enough then the kind of Deployment is enough right?

    • @PavanElthepu
      @PavanElthepu  Год назад +1

      Yes, you can use a Deployment instead of a StatefulSet to deploy a single replica of MongoDB. However, there are some important differences between the two that you should consider before making a decision.
      A StatefulSet is typically used when you need to manage stateful applications that require stable, unique network identities and persistent storage. MongoDB is a stateful application, and using a StatefulSet ensures that each replica has a unique identity and that data is stored persistently.
      On the other hand, a Deployment is typically used for stateless applications that can be scaled horizontally. MongoDB can also be deployed in a stateless manner, with a single replica running in a container, and a Deployment can be used for this purpose.
      Using a StatefulSet for a single MongoDB replica provides some benefits, such as:
      Unique network identity: Each replica will have a unique hostname that can be used to communicate with it, even if the replica is restarted.
      Persistent storage: Each replica will have its own persistent volume, which ensures that data is retained even if the replica is restarted or moved to a different node.
      Ordered startup and shutdown: StatefulSets ensure that replicas are started and stopped in a specific order, which can be important for stateful applications.
      However, if you only need a single MongoDB replica and do not require these benefits, a Deployment can be used instead. It is simpler to set up and manage, and can still be scaled horizontally if needed in the future.

  • @HarshaVardhan-mr2bw
    @HarshaVardhan-mr2bw Год назад

    Hi, can anyone guide me to connect this statefulset replicaset to the mongo compass. Thank you

    • @PavanElthepu
      @PavanElthepu  Год назад

      Hi Harsha, you mean you want to connect to statefulset from Mongo compass?

    • @HarshaVardhan-mr2bw
      @HarshaVardhan-mr2bw Год назад

      @@PavanElthepu yes

    • @PavanElthepu
      @PavanElthepu  Год назад

      Watch my jobs and cronjobs video. There I gave the connection uri. You may use it from Mongo Compass

  • @chennareddy2770
    @chennareddy2770 Год назад

    Hi @PavanElthepu,
    Your videos are amazing they are very simple to understand. I have a question with the example you have shared in the statefulset.yaml file in the GitHub repo.
    If I have to mount mongodb.conf file under same /data/db under mongo-volume volumemount how do I do it.

  • @nihalahmed6302
    @nihalahmed6302 8 месяцев назад

    Great explanation pavan.. i tried the demo but i am unable to create replication. I am getting below error:
    rs.initiate(
    {
    _id: "rs0",
    members: [
    { _id: 0, host: "mongo-0.mongo.default.svc.cluster.local:27017" },
    { _id: 1, host: "mongo-1.mongo.default.svc.cluster.local:27017" },
    { _id: 2, host: "mongo-2.mongo.default.svc.cluster.local:27017" }
    ]
    }
    )
    {
    "operationTime" : Timestamp(0, 0),
    "ok" : 0,
    "errmsg" : "No host described in new configuration 1 for replica set rs0 maps to this node",
    "code" : 93,
    "codeName" : "InvalidReplicaSetConfig",
    "$clusterTime" : {
    "clusterTime" : Timestamp(0, 0),
    "signature" : {
    "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
    "keyId" : NumberLong(0)
    }
    }
    }
    could you please check and let me know what might be the issue ?
    Thanks !!!

  • @vuat1494
    @vuat1494 Год назад

    now 2023: i meet issue about init primary node and secondary node
    "errmsg" : "replSetInitiate quorum check failed because not all proposed set members responded affirmatively: mongo-1.mongo.mongodb.svc.cluster.local:27017 failed with Couldn't get a connection within
    the time limit",
    "code" : 74,
    "codeName" : "NodeNotFound",
    i need help