DevSpace 6 is Here!

Rich Burroughs
Minute Read

We’re excited to announce that DevSpace version 6 has been released. Thanks to everyone who used the alpha and beta versions and gave us feedback.

If you’re not familiar with DevSpace, it’s an open source tool that lets you streamline and speed up your Kubernetes development workflows. If you’re building apps or services that run in Kubernetes clusters, DevSpace can help. DevSpace lets you and your team define your workflow in a devspace.yaml file, which means you can all share the same workflow and reference the config to know exactly how it works. DevsSpace has other great features like hot reloading, which updates the code in your running dev container when you make changes without having to do a new container build.

There are many improvements in DevSpace 6, but here are some highlights:

Pipelines

Pipelines is a new feature that makes it easier to manage the tasks in your devspace.yaml. With pipelines, you can order the actions in your workflow and reuse them easier. Pipelines can call built-in DevSpace functions or ones you define, and they use a Bash-like syntax that should be very familiar to most users.

Here’s an example of a simple procedural pipeline.

version: v2beta1
name: my-project
pipelines:
  # Override the default devspace dev behavior
  dev:
    run: |-
      # Create a new deployment on the fly with an alpine container
      create_deployments my-simple --set helm.values.containers[0].image=alpine

      # Starts syncing local directory to /app in that container and open a terminal to it
      start_dev my-dev --set imageSelector=alpine \
                       --set sync[0].path=.:/app \
                       --set terminal.enabled=true

If you’re stuck using hard-to-read Makefiles or other homegrown solutions, pipelines can make your workflow more readable and usable for your entire team.

You can read more about pipelines in the docs.

Imports

The imports feature allows you to import other devspace.yaml files. This allows you to share functions, commands, and pipelines between your projects. As you can probably imagine, being able to import those objects brings a lot of flexibility and composability to building your devspace.yaml files. For example, you could maintain a library of shared DevSpace functions, pipelines, and commands that you import into all of your projects.

Imports just take a few lines of code in your devspace.yaml:

version: v2beta1
imports:
- git: github.com/yourcompany/example-project.git
  tag: v1.2.0

Imports is a great way to DRY up your DevSpace config, and we’re excited to see what kinds of patterns emerge from the community. See the imports doc for more details.

SSH

One issue many developers find painful is troubleshooting problems in their app containers. The new SSH feature in DevSpace injects an SSH server that you can use to easily connect to your running dev container. You can connect with your local ssh or scp commands or even with IDEs that support SSH connections like VS Code. DevSpace automatically adds an entry to your .ssh/config file and generates a key pair for the connection. All of this can be enabled with a few lines in your devspace.yaml:

dev:
  my-dev:
    imageSelector: ubuntu
    ssh: {}

You can even set breakpoints in your code and quickly debug with VS Code’s Run and Debug view. This takes almost zero extra setup when using DevSpace’s SSH server.

Read more about the new SSH feature in the docs.

Proxy Commands

At times you may want to run commands in your dev container while troubleshooting, but it may be missing things like your kubeconfig file or the Git checkouts of your code. While it’s possible to sync those things to your dev container, that takes extra setup and can be slow if you have large code checkouts.

The new proxy commands feature leverages the SSH server we just discussed to run commands you execute within the container on your local computer instead. It’s simple to configure the list of specific commands to proxy in your devspace.yaml:

dev:
  my-dev:
    imageSelector: john/devbackend
    terminal: {}
    proxyCommands:
    - command: git
    - command: devspace
    - command: kubectl

If you spend much time in your dev container troubleshooting, this is a quality of life improvement that can save you some time and headaches. There are more details in the proxy commands doc.

Getting Started With DevSpace 6

DevSpace 6 is backward compatible with previous configurations, so you can upgrade your DevSpace client at any time with `devspace upgrade`. At that point, you’ll receive an upgrade hint whenever you run the `devspace dev` command. To start using the new features you’ll need to update your devspace.yaml file to use the new config version, v2beta1.

You can find the configuration reference for DevSpace 6 in the docs. You can also see the release notes for more details about what’s in the release, including breaking changes in the new config format.

If you need help with anything, you can open an issue on GitHub or join the #devspace channel in our Loft Community Slack, where the DevSpace maintainers and other users can help.

We hope you find the new DevSpace features helpful, and we look forward to hearing your feedback.

Sign up for our newsletter

Be the first to know about new features, announcements and industry insights.