kpt YAML Transformation - No Helm Templates, No Kustomize Overlays

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ก.ค. 2024
  • Why don't we use "pure" YAML to define Kubernetes resources? Wouldn't that be more "GitOps friendly" than using Helm templates or Kustomize overlays?
    Can kpt get us back to "pure" YAML?
    #kpt #kubernetes #helm #kustomize
    Consider joining the channel: / devopstoolkit
    ▬▬▬▬▬▬ 🔗 Additional Info 🔗 ▬▬▬▬▬▬
    ➡ Gist with the commands: gist.github.com/497a72d63c159...
    🔗 kpt: kpt.dev
    🔗 Datree: datree.io
    🎬 Helm vs Kustomize - The Fight Between Templating and Patching in Kubernetes: • Helm vs Kustomize - Th...
    🎬 How To Write And Test Kubernetes Manifests With Datree: • How To Write And Test ...
    ▬▬▬▬▬▬ 💰 Sponsoships 💰 ▬▬▬▬▬▬
    If you are interested in sponsoring this channel, please use calendly.com/vfarcic/meet 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
    ▬▬▬▬▬▬ 🚀 Courses, books, and podcasts 🚀 ▬▬▬▬▬▬
    📚 Books and courses: www.devopstoolkitseries.com
    🎤 Podcast: www.devopsparadox.com/
    💬 Live streams: / devopsparadox
    ▬▬▬▬▬▬ ⏱ Timecodes ⏱ ▬▬▬▬▬▬
    00:00 Introduction to kpt
    05:46 Explore kpt
    23:15 kpt Pros And Cons
  • วิทยาศาสตร์และเทคโนโลยี

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

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

    What do you think about kpt? Can it replace Helm and Kustomize?

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

      For me it doesn't need to beat Helm and Kustomize but Jsonnet, which in my team is our go-to for GitOps friendly, modular, reusable template (building block)s. Have you put Jsonnet on your backlog yet?

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

      Apparently I was late by an hour on that, but maybe this can serve as a bump for it ;)

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

      @@atraos It is already on my TODO list and I just moved it close to the top :)

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

      Grafana Tanka… makes helm actually useable and obsoletes Kustomize.

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

      Why not just use a generic programming language like Python to do the transformation? Then you can also use the entire ecosystem like editors, linters and tests. You can also split base yaml files and environment configuration and then just generate the manifests which can be picked up with a gitops pipeline

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

    kustomize is challenging for sure, but I think a lot of people are unaware that it has functional, composable "components" now.

  • @ronaldm.1556
    @ronaldm.1556 2 ปีที่แล้ว +2

    Kpt is amazing and I’m seriously studying this tool on my homelab

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

    Thanks viktor for this vidéo. I love thé way kpt handles manifests modifications Using krm function. I look forward to see how this can be applied to crossplane composition function that Will be official available in 10 days.... Hope to see another great vidéo on this very soon !!!!! Once again Thanks a lot for all your amazing vidéo tutos

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

      Oh yeah. Crossplane functions are coming soon and I'll certainly create some material about it. I'm not sure whether I'll post it in this or the Upbound channel so keep an eye on both.

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

    Great point about the academic description being a big weakness of kpt!

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

    Sounds interesting. For me it sounds a bit as if you still need kustomize so its not that interesting at the moment but worth looking out for. Kustomize bundling all resources to one single file can be annoying if you have many resources and in that case kpt with the in place transformation would be very nice. Thank you as always for this amazing video!! learning so much from you

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

      I agree. I still need Kustomize. Nevertheless, kpt might make me change my mind and use it exclusively if it irons some of the week parts and/or add a few missing features.

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

    did you buy this shirt in Barcelona? If so, where? Thanks for the video 📷 great content as always 🙂

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

      Not Barcelona... I got it from Mexico :)

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

    I like the simplicity of this tooling, however… I do worry about the limits of changes. For example, and obviously playing on the pain you identified with templating, I can see a need for conditionals - if you cannot differentiate on namespacing and iterations to drill into a list of things and apply to each item.
    More significantly I think this pushes the need to maintain a mental model when deciding on changes. In programming this was one of the benefits of typed languages/dsl, this enables introspection beyond key/value to the relationships themselves. I have referenced recent devops tooling as following the interpreter pattern. When this pattern is applied to a type based dsl, you then have the ability to introspect (reason) about your model and changes you want to make.
    Perhaps a typed language/dsl is the answer and then composition; inheritance and polymorphism will allow functional or object oriented compilation to render the final model. An infrastructure compiler :-)

  • @watahface
    @watahface 8 หลายเดือนก่อน +1

    liked and subscribed :D

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

    Great video thanks. Have you tried it without a container runtime yet via the WASM integration? `kpt fn render . --allow-alpha-wasm`

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

      I haven't tried WASM with kpt just yet. It's still on my TODO list... :(

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

    We use a8m/envsubst on my current work project, simple and does the job.

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

    I don’t understand one thing, it’s possible to use kpt together with helm packages ?

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

      Yes it is. You can use kpt functions to transform any type of YAML, including the one in chart's `templates` directory.
      That being said, I think that using both might be a bit too much, but that is certainly possible.

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

    I really tried to use kpt even before your video. But the fact that their front page has 0 examples and I need to sit down and watch a 10 minute video just to understand what kpt does just turned me away.
    After watching your video, it still not clear to me if this was an internal Google tool that they open sourced, or simply a component needed in Config sync.
    I looked at the documentation again and it is written like a research paper targeted at academics instead of software engineers.
    Hard pass

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

    Does the --- removal break multi resource files?

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

      It removed --- from my manifests because each had a single document inside. If there were multiple docs, it would separate them with ---.
      I like adding --- even if there is a single doc in a file mostly because I sometimes concatenate them all with something like 'cat *.yaml'.
      It is not making changes to manifests that make them not work, but it reformats them and that is annoying.

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

    kpt smells like a cloud native awk an sed

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

      Exactly. I use it instead of sed.

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

    Seems very interesting - Not sure I fully get the value aside from using it to manage the base yaml.. But I think it needs to be able to apply the changes at apply time using argo or similar tools. But I think that would go against the model its intended to maintain. So it seems like a really good tool for people managing yaml files in git that are not using gitOps. Its a no brainer replacement for kubectl apply.. But for now, thats probably all..

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

      Applying resources with Argo CD is not a problem. The output is pure yaml or, to be more precise, it modifies (not output) pure yaml. So, anything can apply it. As a matter of fact, it is a perfect companion to gitops tools precisely because of its in-place modifications.
      P.S. I'm referring to kpt functions and not the rest of features like packaging.

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

    Helm Charts - a write-only language ;-)

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

    I actually think that Prometheus and Grafana have the proper approach with tanka and jsonnet. I really regret having avoided jsonnet for so long. You should make a video about tanka and jsonnet!

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

      Adding it to my TODO list...

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

      I too recently noticed how much time and effort prometheus-operator and the associated customization library kube-prometheus have invested in jsonnet. It's not going away, right? ArgoCD supports jsonnet, too, and there's a plugin for Flux. By the way, kube-prometheus is not to be confused with the community helm charts such as kube-prometheus-stack.

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

      @@joebowbeer RIP ksonnet

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

      @@rexroof ArgoCD dropped support for ksonnet, but jsonnet is going strong in prometheus land AFAICT and is supported by ArgoCD

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

      Done: th-cam.com/video/-qpcsUXElYc/w-d-xo.html

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

    ytt is another tool in this space from VMware's Carvel project.

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

    tired of yml? you can do kubernetes in your favourite language with CDK8S (with some superset constructs)

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

    You should be my maths teacher

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

    ;-)