is garden right for me?
# 🌱|help-and-getting-started
a
I’m working on a yet-released open source project that is a handful of microservices. I plan to have K8s set up as the default deployment option, so I figured I might as well also develop within it. Also because Helm charts seem less of a hassle than docker compose. Is my understanding right that I’d use garden to develop within a cluster locally that mirrors the would-be production cluster, then use it in CI to test everything, then deploy to an ephemeral cluster for more hands-on testing? I don’t have a need to deploy it anywhere long-term, just to be able to test that everything works. The only part that requires an account or anything is the ephemeral stuff, yeah?
f
Hi @adventurous-helicopter-50870 and welcome to the garden community! You can definitely use garden in a local cluster that mirrors the future production cluster. But garden is not limited to that, it can also be used for developing and testing in a remote Kubernetes cluster see for example here https://docs.garden.io/use-cases/local-development-remote-clusters. And we have ephemeral clusters, which are kubernetes clusters that are spun up remotely on demand and last a maximum of 4 hours see https://docs.garden.io/kubernetes-plugins/ephemeral-k8s. In ci you can again test against either of these cluster types. The idea behind garden is really, that if you are already using Kubernetes in production you already have all these helm charts. Kubernetes manifests etc. Garden bridges the gap to allowing you to deploy your stack to any kind of Kubernets cluster adding tests and tasks to the mix as well as building your container images on code changes or using live syncing the code changes altogether. I guess what i am trying to say is, it really does not matter which kind of Kubernetes cluster (local, ephemeral, remote) suits you best right now (it might also change in the future). Once you have your Garden project in place it can even have multiple environments where Garden will deploy to different clusters based on the environment. The goal here is that you have some simple commands like
garden test
that you can run from your local computer or in CI and that this will always produce the same results. I hope that answered your question, but please send follow up questions if you have them 🙂
b
Agree with Anna here; short answer is yes; it’s the right tool most of the time, specially when you want to do the same in local as you would do in a production environment, there are multiple examples in the Garden repository that already solved for this problem
a
Thanks, that all seemed to be the case but wanted to make sure because I’m new to the world of k8s things and wasn’t 100% sure I was understanding everything lol.