Coder.comC
Coder.com11mo ago
11 replies
Arturo Ghinassi

Fresh Coder helm installation fails Workspace creation

I created a coder instance using helm following step-by-step the docs using a custom TLS ingress that works fine.

The installation has been successful, but when I try to create a workspace using the default kubernetes template, the Coder UI fails to connect with the pod with this error:
2025-03-12 11:37:47.707 [info]  connecting to coderd

2025-03-12 11:37:47.795 [warn]  run exited with error ...

    error= GET https://coder.mydomain.com/api/v2/workspaceagents/me/rpc?version=2.3: unexpected status code 403: unexpected non-JSON response ""

               Error: no response body


While in the coder controller I have these logs:
2025-03-12 11:32:19.395 [info]  provisionerd-coder-85cc58dcd5-b2mst-0.runner: apply successful  job_id=eea0a5f0-9e46-417f-a22c-d96f556dc68e  template_name=dev-machine  template_version=gifted_allen5  workspace_build_id=29a09c0b-75cb-458f-9c32-f9b1faecdd52  workspace_id=745d2861-d1ba-4cab-af60-3d9430baadb1  workspace_name=test  workspace_owner=admin  workspace_transition=start  resource_count=2  resources="[kubernetes_persistent_volume_claim.home kubernetes_deployment.main]"  state_len=35276

2025-03-12 11:32:19.402 [info]  provisionerd-coder-85cc58dcd5-b2mst-0: recv done on Session  session_id=3b8513dc-8714-45e0-ae55-c3c1130cca33  error=EOF

I attached the screen of what the UI shows, while on kubernetes the pod is in "running" state.
image.png
Solution
@Phorcys I solved it!
The problem was the ingress class I was using, I had to enable websockets in the annotations.
For everyone who users Contour wondering how I solved it, this is the config:
ingress:
  enable: true
  className: contour
  host: coder.mydomain.com
  annotations:
    projectcontour.io/websocket-routes: "/"
  tls:
    enable: true
    secretName: mydomain.com


I will close the issue on github with the answer.
Was this page helpful?