There are two main modes how to develop with DevSpace, by streaming the log output of pods in DevSpace or by opening a terminal to the pod you would like to develop with. If you prefer the latter, you can configure the
dev.terminal option to tell DevSpace to open a terminal to a target container.
dev.terminal section in the
devspace.yaml you can configure the terminal:
You will need to make sure that the container has a terminal equipped and is sleeping so that you can start your application.
imageSelector option expects a string that specifies an image (e.g.
my-registry.com/lib/my-image:tag) to select a target pod and container with. The newest running pod that has a container which matches this image will be selected by DevSpace.
In addition, you can also reference images from the
images section in the
- If the image in
images.*.image, DevSpace will automatically append the latest built tag during runtime to the
- You can also let DevSpace resolve the target image and tag by using the helpers
labelSelector option expects a key-value map of strings with Kubernetes labels. This can be used to select the correct target pod with labels instead of the image name like
imageName. If the pod you want to select has multiple containers, make sure to use
containerName as well.
If you select a pod via
labelSelector and the pod has multiple containers, you'll need to specify a container name with this option.
If this option is specified DevSpace will search the pod in this namespace.
If this option is specified DevSpace will open the shell in the specified working directory.
command option expects a string array as optional configuration for how to open the shell for terminal forwarding. If this option is specified,
workDir will not work anymore.
command is a non-interactive command that terminates, DevSpace will run the command and exits after the command has terminated.