Need fast iterations with hot reload, debugging, and collaboration over k8s envs?

Announcing Kustomize Support

The Raftt Team
March 8, 2023
3
 min read

# Announcing Kustomize Support

One of our goals at Raftt is to minimize the configuration needed for using existing IaC definitions for development environments. To that end, we’ve supported spawning environments based on [Helm charts and straight Kubernetes YAMLs](https://www.raftt.io/post/helm-and-k8s-manifest-support) for a while. This has allowed teams to take their existing definitions, and with very little configuration spawn fully-featured development environments including code hot reloading, debugging, and collaboration.

## And now - we support [Kustomize](https://kustomize.io/) too!

Kustomize is a powerful tool for maintaining different configurations of Kubernetes manifests through an overlay mechanism. It is super easy to define different “flavors” of definitions to modify them as needed for different uses / environments. For example, while you may want `replicas: 6` for the production deployment, for development `replicas: 1` makes more sense. Utilizing Kustomize’s overlays this becomes simple and maintainable. Take a look at [their docs](https://kubectl.docs.kubernetes.io/guides/introduction/kustomize/) for more info

Kustomize is pretty popular, so we are excited to announce that Raftt now supports it OOTB! This means that you can now use pre-existing Kustomize yaml files to spawn environments with a single line in your `.raftt` file, and there is no need to create new declarations or re-configure anything. Only augment the existing resources with additional dev-related configurations, such as port mapping or hot reloading.

To get started with Kustomize on our platform, all you need to do is modify your `.raftt` file and add the following line:

```go
resources = kustomize_build("./kustomize")
deploy(resources)
```

This will run the Kustomize binary, generate the manifests, and deploy them to your environment.  You can specify the wanted Kustomize version using the `version` flag:

```go
resources = kustomize_build("./kustomize", version="4.7.5")
deploy(resources)
```

Make sure to note the currently supported versions [in our docs](https://docs.raftt.io/config/rafttfile#import-kustomize-files).

## Built-in Kustomize Helm Support

Kustomize includes basic support for inflating helm charts, allowing complex projects to source and overlay on top of resources defined through Helm. This is supported out of the box in our integration as well. To specify a Helm version you can use the `helm_version` flag:

```go
resources = kustomize_build("./kustomize", helm_version="3.10.1")
deploy(resources)
```

Make sure to note the currently supported versions for helm [in our docs](https://docs.raftt.io/config/rafttfile#import-helm-charts).

If you need different versions, it is really quick on our end to add them, so just let us know 🙂.

## Going Forward

Supporting Kustomize in Raftt was a super quick task due to the powerful DSL we have developed and expose in the `.raftt` file. Are you interested in using Raftt, but are currently using a different tool to define your Kubernetes resources? Let us know and we will support it too! 🙂

The Raftt Team

Stop wasting time worrying about your dev env.
Concentrate on your code.

The ability to focus on doing what you love best can be more than a bottled-up desire lost in a sea of frustration. Make it a reality — with Raftt.