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.
imageName expects a string and can be used to select a container based on an image specified in
images or in a dependency.
If you specify neither
labelSelector, DevSpace will ask the user which pod to select if it finds more than 1
labelSelector option expects a label selector map to select a pod based on labels. If multiple pods match, the newest will be selected and DevSpace waits until that pod is running.
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.