May 15, 2024
Get featured on Geeklore.io
Geeklore is in very early stages of development. If you want to help us grow, consider letting us sponsor you by featuring your tool / platform / company here instead of this text. 😊
Hello fellow Kubernetes enthusiasts! In my previous blog posts we explored the basics of Jsonnet and how to use it to generate Kubernetes manifests. Now, I'm thrilled to finally get to the deployment of our production-ready, Jsonnet-templated application to ArgoCD.
I am expecting you to have a basic understanding of ArgoCD and Kubernetes for this one. If you need a refresher, check out some resources online (before I create my own tutorials on these topics):
Before diving in, here's a quick overview of what you need to follow along:
ArgoCD is a declarative, GitOps continuous delivery tool for Kubernetes. It allows us to deploy applications to Kubernetes using Git repositories as the source of truth. ArgoCD also supports Jsonnet, allowing us to deploy Jsonnet templates directly to Kubernetes.
I repeat - ArgoCD support Jsonnet out of the box! This is a huge advantage, as we can leverage Jsonnet's power to create dynamic Kubernetes manifests, and deploy them using ArgoCD.
The application, now live, dynamically greets users with the name provided in the YOUR_NAME environment variable.
Here is how the application looks like in ArgoCD:
And here is the application itself:
Now if we update the YOUR_NAME environment variable in the parameters.libsonnet file, and sync the application in ArgoCD, we can see the application dynamically update:
This small, yet powerful demonstration shows the flexibility and power of combining Jsonnet for templating Kubernetes for ArgoCD.
If you made it this far, thank you for reading! I hope you enjoyed this series and learned something new. I am planning to continue writing about Jsonnet and other Kubernetes-related topics, so stay tuned!
For the next Jsonnet post, I am thinking of diving deep into combining multiple templating languages and use Jsonnet + Helm to deploy Grafana and Prometheus.
Thank you for following along and if you feel like chatting, feel free to hit me up on x/twitter!
And drums ... closing gif!
Latest Comments
fwefwkopfpfwpfepefkoepfpkowfokew