devspace icon indicating copy to clipboard operation
devspace copied to clipboard

Prioritize service instead of devspace UI when using port 8090

Open jackwilsdon opened this issue 4 months ago • 2 comments

What happened?
Port forwarding a service on 8090 using devspace dev serves the UI instead of the service.

What did you expect to happen instead?
The service should take priority and the UI should run on the next available port.

How can we reproduce the bug? (as minimally and precisely as possible)
Run devspace dev with the following devspace.yaml:

version: v2beta1
name: whoami
deployments:
  api:
    helm:
      chart:
        name: component-chart
        repo: https://charts.devspace.sh
      values:
        containers:
          - image: traefik/whoami
            env:
              - name: WHOAMI_PORT_NUMBER
                value: "8090"
        service:
          ports:
            - port: 8090
dev:
  api:
    imageSelector: traefik/whoami
    ports:
      - port: "8090"

Local Environment:

  • DevSpace Version: 6.3.17
  • Operating System: mac
  • ARCH of the OS: ARM64

Kubernetes Cluster:

  • Cloud Provider: docker desktop
  • Kubernetes Version: client: v1.33.3, server: v1.32.2

jackwilsdon avatar Sep 01 '25 12:09 jackwilsdon

Hello!

You can re-map the local port to avoid the conflict:

...
dev:
  api:
    imageSelector: traefik/whoami
    ports:
      - port: "8091:8090"

Hope that helps!

lizardruss avatar Sep 04 '25 19:09 lizardruss

I can change the port it's exposed on, but it'd be nice to be able to use any port (a number of our services use 8090, and it'd be good if it used the same port when running inside and outside of Kubernetes).

jackwilsdon avatar Sep 05 '25 11:09 jackwilsdon