Skip to main content
Version: 5.x

DevSpace Localhost UI

DevSpace provides a powerful client-only UI for Kubernetes development.

DevSpace Localhost UI
DevSpace Localhost UI - Overview

Open The UI

Running devspace dev will automatically start the UI in the background and then show a log output similar to this one:

#########################################################
[info] DevSpace UI available at: http://localhost:8090
#########################################################

By default, DevSpace starts the UI on port 8090 but it chooses a different port if the default port is already in use by another process.

To access the UI started by devspace dev, just copy and paste the URL shown in the output of the command (see example above) into the address bar of your browser.

Additionally, you can also start the UI using the following command:

devspace ui
Use without Config

The advantage of devspace ui is that it does not require a devspace.yaml and can be run from anywhere no matter what your current working directory is.

note

If you run devspace ui while devspace dev is already running, the command will not start a second command and will rather open the existing UI started by the devspace dev command.

Logs

The logs view is the central point for development. Here, you can find your pods and containers, stream logs, start interactive terminal sessions and more.

Inspecting Pods & Containers

The logs view allows you to:

DevSpace Localhost UI
DevSpace Localhost UI - Inspecting Pods & Containers

Stream Logs

To stream the logs of a container, just click on the name of the container on the right-hand side of the logs view.

DevSpace Localhost UI
DevSpace Localhost UI - Streaming Container Logs

If you want to stream the logs of all containers that devspace dev has deployed using an image that is specified in the devspace.yaml of your current project, click on "All deployed containers (merged logs)". This feature is only available when you start the UI via devspace dev or by running devspace ui within a project that contains a devspace.yaml.

To close the log stream, click on the trash icon on the right upper corner of the log stream window.

To maximize the log stream, click on the maximize icon on the right upper corner of the log stream window.

Last 100 Lines

The log stream prints the last 100 log lines and then starts streaming the logs in real-time.

Streaming in the background

Once you start the log stream for a container, DevSpace will keep the streaming connection open even if you switch to the logs of another container. This will allow you to quickly switch between log streams without having to wait until the connection has to be re-established.

Start Terminals

To start an interactive terminal session for running commands inside a container, just click on the >_ icon next to the container's name.

DevSpace Localhost UI
DevSpace Localhost UI - Starting Interactive Terminals

The terminal session will stay open even if you click on a container name to stream the logs of this container. The >_ icon will be highlighted using a blue color to indicate that the terminal session is still running. Click on the icon to resume the terminal session.

To close a terminal using the kill command, click on the trash icon on the right upper corner of the terminal window.

To maximize a terminal, click on the maximize icon on the right upper corner of the terminal window.

Open / 1-Click Port-Forwarding

If you want to access an application running inside a container, you can click on the "Open" icon next to the container's name. After clicking on this icon, DevSpace will start a port-forwarding process between a randomly chosen local port and the application's port inside the container. After the port-forwarding connection is established, DevSpace will open the application on localhost using the randomly selected local port.

Service Required

This feature is only available for containers inside pods that are selected by the labelSelector of at least one service (i.e. the pod must be an endpoint of the service).

DevSpace Localhost UI
DevSpace Localhost UI - Open Applications in Containers (via 1-Click Port-Forwarding)

Stack

If you open the stack view, DevSpace will show:

DevSpace Localhost UI
DevSpace Localhost UI - Stack: Config, Profile, Variables

Commands

DevSpace allows you to define custom commands in your project's devspace.yaml which allows you to store and execute commonly used commands and share them with other developers.

The localhost UI of DevSpace provides a view that shows all available commands defined in your project's devspace.yaml. You can view the commands definition and execute the command by clicking on the "Play" button.

DevSpace Localhost UI
DevSpace Localhost UI - Open Containers (via 1-Click Port-Forwarding)

Clicking the "Play" button for a command with name my-command is equivalent to running the following command in your terminal:

devspace run my-command