Kubernetes Deployment Order and Dependencies Demystified

Ғылым және технология

In the dynamic world of cloud-native applications, Kubernetes reigns supreme as the orchestrator of containerized microservices. However, mastering the order of deployment of Kubernetes resources and dependencies can be a daunting task, especially since many of us are trying to apply the logic and the processes we had in the past. Let's try to demystify that with examples that contain applications, databases, database schemas and users, namespaces, and a few other typically managed resources.
#kubernetes #cloudnative #devops #containers #orchestration
Consider joining the channel: / devopstoolkit
▬▬▬▬▬▬ 💰 Sponsorships 💰 ▬▬▬▬▬▬
If you are interested in sponsoring this channel, please use calendar.app.google/Q9eaDUHN8... to book a timeslot that suits you, and we'll go over the details. Or feel free to contact me over Twitter or LinkedIn (see below).
▬▬▬▬▬▬ 👋 Contact me 👋 ▬▬▬▬▬▬
➡ Twitter: / vfarcic
➡ LinkedIn: / viktorfarcic
▬▬▬▬▬▬ 🚀 Other Channels 🚀 ▬▬▬▬▬▬
🎤 Podcast: www.devopsparadox.com/
💬 Live streams: / devopsparadox

Пікірлер: 27

  • @DevOpsToolkit
    @DevOpsToolkit6 ай бұрын

    How do you manage dependencies and ordering of resources managed by Kubernetes?

  • @andreaspoly

    @andreaspoly

    6 ай бұрын

    ArgoCD with sync and waves 🎉

  • @juanbreinlinger

    @juanbreinlinger

    6 ай бұрын

    Helm + taskfiles with built in dependencies and outputs (Similar to gradle tasks)

  • @matteobaiguini5940

    @matteobaiguini5940

    6 ай бұрын

    ArgoCD rules for whatever is not offered by K8s out of the box

  • @matteobaiguini5940

    @matteobaiguini5940

    6 ай бұрын

    anyway following GitOps it's right way to go... using ArgoCD sync-waves is just a little trick to deploy and let things work faster, avoiding many failures in the loop...

  • @jacekbartyzel2106

    @jacekbartyzel2106

    6 ай бұрын

    Argocd sync waves + hook jobs in sync phase in specific sync wave that validate if dependency is satisfied before progressing the sync. For example you install the operator and then in next sync wave run a hook job that validates if CRD was already created. Script validating if CRD exits with 0 if CRD is there or it exits with 1 and sleeps for 120 seconds. In job you set backofflimit to 15 and now you have gate that will check for 30 minutes if CRD was created. Once it is there you sync your custom resource. Quite handy pattern. I used for whole day2 Openshift setups, like moving ingress routers to infra nodes after Infra nodes have finished installing, but sky is the limit here 😊

  • @IvanRizzante
    @IvanRizzante6 ай бұрын

    Thanks for another great video 🎉 honestly I was waiting for one on this subject, app dependencies can be tricky if not done the right way and at the beginning of my kubernetes journey I was struggling with them too! I took the path of remote development and luckily I solved many problems with it, but I still think the subject is worth a clarification

  • @AdibSaikali
    @AdibSaikali6 ай бұрын

    The hard part about eventually consistency is that in a complex system it can take a while for the system as whole to reconcile and while waiting it is hard to tell how far along the system is, is it stuck in an crash loop, why is it stuck in the spot it is stuck in ... etc. So tools that support ordering or troubleshooting are very useful the larger the system gets. A constraint based approach can also be very helpful.

  • @DevOpsToolkit

    @DevOpsToolkit

    6 ай бұрын

    It's true that troubleshooting a complex system is difficult, but so is the imperative orchestration.

  • @AdibSaikali

    @AdibSaikali

    6 ай бұрын

    You don't need to get to imperative orchestration to get the ordering required. A query and constraints that must be true before the next set of objects to start reconciling can do the trick. So you don't write a sequence of step1, step2, step 3 rather you say something like a pre-req for this object to start reconciling is a that a query result set meets certain criteria. This allows the reconciler to figure out what things can go in parallel and what waits until certain conditions are true ... etc. Canary rollouts use this approach where they wait until a query against a metrics store meets some condition before proceeding to change the desired state. I really wish the k8s API server had a native feature that allowed objects to be accepted but does not start reconciling until a query condition is true, its is just the flip side of being in a crashloop backoff, but at least you would see something like waiting for x condition to be true to start reconciling. makes troubleshooting a lot easier.

  • @DevOpsToolkit

    @DevOpsToolkit

    6 ай бұрын

    @AdibSaikali that's similar to what i tried to expñain except that I used data as a dependency instead of a query. If data required to create a resource is available, more often than not, there is no impediment to create it.

  • @DiogoBaeder
    @DiogoBaeder6 ай бұрын

    Great video, man! I'm interested on the second part, about deletion, in case you're willing to record it :-)

  • @DevOpsToolkit

    @DevOpsToolkit

    6 ай бұрын

    Great. I'll start working on it soon.

  • @user-ts8yn8zd1v

    @user-ts8yn8zd1v

    6 ай бұрын

    @@DevOpsToolkit Also looking forward to the follow up on destruction. The current video is my pointer to get colleagues up to speed about this eventual consistency model of deploying.

  • @cheebadigga4092
    @cheebadigga40926 ай бұрын

    Completely agreed on all points!

  • @roganl
    @roganl6 ай бұрын

    Great talk again today. Again, the bubble sounds distract. Would love to have seen an animation, and/or code/config example of the process as you've articulated it.

  • @DevOpsToolkit

    @DevOpsToolkit

    6 ай бұрын

    I'll work on a video with hands-on variation.

  • @frost266

    @frost266

    6 ай бұрын

    For feedback, I quite like the 'bubble' sounds, they help punctuate milestones in your communication.@@DevOpsToolkit

  • @autohmae
    @autohmae5 ай бұрын

    19:55 this sounds very similar to: KPT says "configuration as data"

  • @DevOpsToolkit

    @DevOpsToolkit

    5 ай бұрын

    KPR is running on client-side so the functions will be executed only once and that means that you have to run them in certain order.

  • @autohmae

    @autohmae

    5 ай бұрын

    @@DevOpsToolkit Seems I put in the wrong timestamp, I meant 19:30 you mentioned it's all data, I was just pointing out, KPT calls it data too.

  • @DevOpsToolkit

    @DevOpsToolkit

    5 ай бұрын

    @@autohmae Oh yeah. From the data perspective, KPT got it right.

  • @kaandiren398
    @kaandiren3986 ай бұрын

    How can we define the deployment order&dependencies in argocd? Any ideas?

  • @DevOpsToolkit

    @DevOpsToolkit

    6 ай бұрын

    Take a look at kzread.info/dash/bejne/fn-ptNaIhNnSiM4.html. I'm working on a follow up to both that one and the one from this comment. It'll be live in a few weeks.

  • @mishugrig6832
    @mishugrig68326 ай бұрын

    We have a deployment mission problem…let's use k8s…great…now we have two problems😂

Келесі