Purple white and red flowers.
Our garden is growing. We've raised a Series A funding round.
Read more here

Remote Kubernetes development with Garden — the best of both worlds

Þórarinn Sigurðsson
Þórarinn Sigurðsson
January 28, 2020

When developing multi-service systems running on Kubernetes, most of us still do the majority of our coding against a local instance of our stack. This approach has several limitations. It forces us to run a local Kubernetes cluster on our dev machines, which tends to be very resource-heavy.

Practically, this means that many teams only work on a subset of their services at a given time, since laptops simply can’t run larger systems in their entirety — there’s not enough RAM, for one.

This also means that the dev environment is quite different from the CI environment, and that we can’t really run meaningful integration tests until we’ve committed and pushed our changes. Therefore, we tend to get failing integration tests more often than we would if we could run them on-the-go during development.

For all their flaws, local dev setups can offer those sweet, rapid feedback loops that help us stay in the zone as we write and debug code. Sure, we tend to lean a bit too heavily on CI, but it’s a workable compromise in many cases.

But what if we could have the best of both worlds?

What if we had a remote development environment running the whole stack, where we could confidently run our integration tests (or any subset of them) at will as we’re coding and debugging?

And where our core write/debug/test workflows are at least as fast and responsive as in our old local setups?

This is the motivation behind Garden’s remote building feature.

The framework watches for changes to your source code and syncs them to your remote cluster, which does all the heavy lifting of building, deploying and testing. Clusters are better at being clusters than laptops are, after all.

With dependency-aware rebuilds, full-powered tests and hot reloading against a persistent remote instance of your stack, this yields a fast, consistent and productive development environment.

And as an added bonus, getting started with all this is relatively simple!

In this screencast, we’ll walk through some common development workflows using an example project configured for remote development with Garden.

Remote Kubernetes Development with Garden
Remote Kubernetes Development with Garden

We at Garden think that remote development environments show a lot of promise as a general approach to back-end development. Systems like Kubernetes aren’t only a solution for operating production systems — we think they can also be a strong foundation for the next generation of developer tools.

If you’d like to take all this for a spin, here are a few links to help you get started:

Our Github repo: https://github.com/garden-io/garden

Using a remote Kubernetes cluster with Garden: https://docs.garden.io/guides/remote-kubernetes

An example project configured for remote Kubernetes clusters: https://github.com/garden-io/garden/tree/master/examples/remote-k8s

How to create and configure a Kubernetes cluster with AWS, GKE or Azure: https://docs.garden.io/guides/cloud-provider-setup

Finally, we’d be happy to chat with you in our community channel (#garden) on the Kubernetes Slack workspace : )

previous arrow
Previous
Next
newt arrow