Is Pulumi the Best Choice for Generating Kustomize Templates Instead of Just Using YAML?

0
5
Asked By DevOpsExplorer92 On

Hey everyone,

I'm currently managing a k3s cluster and using ArgoCD to deploy our applications, which are set up as kustomize templates with overlays for different environments. While the process works well with our developers pushing new code and having ArgoCD handle deployment, I've been facing some frustrating issues with YAML formatting errors that aren't caught until they hit ArgoCD. I've also encountered logic errors after copy-pasting and manually editing these templates.

Given I'm the only DevOps person on the team, I'm trying to streamline our workflow beyond the usual advice of "just copy and paste this template and tweak as needed." I'm exploring a more programmatic approach to writing manifests, which is why I'm looking into Pulumi, KCL, or CUE. I've started dabbling with KCL already, but I'm really keen on learning Pulumi for my own skill development and because my team works with TypeScript. I haven't touched CUE yet, but I know I need to begin somewhere.

Ultimately, I'm leaning towards Pulumi for generating templates as part of a build pipeline, enabling me to validate these manifests before pushing to Git. Am I overcomplicating things, or is this a valid approach? I'd love to hear your thoughts on these options!

5 Answers

Answered By KubernetesNewb On

Have you checked out Yoke? It might serve your needs without adding too much to your workflow.

HelpfulHank -

Definitely look into pre-commit hooks! They're super easy to set up and can catch YAML issues before you face them during deployments.

Answered By YAMLWizard On

I tend to test my kustomize configs by running `kustomize build | kubeconform` locally. I explored CUE and Jsonnet, but they felt a bit complicated. KCL was my pick because it seemed the most straightforward for my team. It has great tooling like LSP support, so it makes life easier when collaborating.

Answered By DevOpsDude On

Remember, Pulumi isn't just a templating language like CUE or KCL. It's aimed at a different purpose altogether. Personally, I prefer KCL because it has a smooth learning curve. I managed to create a K8s operator with it without diving into Golang, which was a huge win for me. KCL feels pretty approachable too, like Python, so I found it easy to adopt.

Answered By K8sFanatic On

I totally relate to your struggles! Managing ArgoCD with kustomize was okay initially, but the YAML errors came out of nowhere. I transitioned to Pulumi since we use TypeScript as well, and it integrated perfectly for generating manifests. Now I let CI check everything and ArgoCD manages the deployments. Using Zopdev to test configs has also helped a ton in avoiding those silly mistakes—Pulumi has made everything smoother for me!

Answered By TechieTommy On

Honestly, I haven't found much need for the tools you're considering. Everything can usually be handled with proper components and overlays. If formatting and validation are your main concerns, why not just set up linting for your manifests? You can easily integrated that into your CI/CD pipeline or even use pre-commit hooks to help with the YAML validation. It could cut down on a lot of hassle!

User1234 -

Yeah, that does sound simpler. Just worried I'm complicating things too much.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.