Skip to content
DocsAll docs
Console

Desk workspaces

Create and delete the workspaces of a desk, which the desk starts, stops, and deletes.

Last updated

On this page

Overview

The workspaces of a desk are managed workspaces. They are created in the desk and stay in it for their whole life. Each one reaches the environment of the desk. A desk can hold any number of workspaces, for example one for each component of an application.

ItemManaged workspace
CreatedIn the desk.
Started and stoppedWith the desk. A managed workspace cannot be started or stopped on its own.
DeletedIn the desk, or when the desk is deleted.
desk fieldThe name of the desk.

A standalone workspace, created outside a desk, cannot join a desk later. See Workspace types.

Capsules

A capsule created with desk is a managed workspace that ends with the desk. See Capsules.

Quota

Each workspace counts against the owner's quota as a standalone workspace does. See Quota and limits.

Tasks

Create a workspace in a desk

Reason for the task

Give the desk a workspace that reaches the services of its environment.

Job set-up

Procedure

  1. Create the workspace. Called from a desk, workspace with action set to create creates it in that desk.

    Python
    kl.desks.create_workspace(desk="dev", workspace="backend")
    TypeScript
    await kl.desks.createWorkspace({ desk: "dev", workspace: "backend" });
    Go
    if _, err := kl.Desks.CreateWorkspace(kloudlite.CreateDeskWorkspace{Desk: "dev", CreateWorkspace: kloudlite.CreateWorkspace{Workspace: "backend", QuotaGb: 20}}); err != nil {    log.Fatal(err)}
    Ruby
    kl.desks.create_workspace(desk: "dev", workspace: "backend")
    Java
    kl.desks().createWorkspace("dev", new Kloudlite.CreateWorkspace().workspace("backend"));
    CLI
    kode desks create-workspace backend --desk dev

Close-out

  1. Make sure that the desk's workspaces include the new workspace.

Delete a workspace in a desk

Reason for the task

Remove a workspace that the desk no longer needs.

Job set-up

CAUTION

The workspace is deleted, and its intercepts in this desk are released. Its snapshots remain.

Procedure

  1. Delete the workspace.

    Python
    kl.desks.delete_workspace(desk="dev", workspace="backend")
    TypeScript
    await kl.desks.deleteWorkspace({ desk: "dev", workspace: "backend" });
    Go
    if err := kl.Desks.DeleteWorkspace(kloudlite.DeleteDeskWorkspace{Desk: "dev", Workspace: "backend"}); err != nil {    log.Fatal(err)}
    Ruby
    kl.desks.delete_workspace(desk: "dev", workspace: "backend")
    Java
    kl.desks().deleteWorkspace("dev", "backend");
    CLI
    kode desks delete-workspace backend --desk dev

Close-out

  1. Make sure that the desk's workspaces no longer include the workspace.

Troubleshooting

SymptomPossible causeCorrective action
409 with workspace backend belongs to desk dev; start the desk: kode desks start --desk devThe workspace belongs to a desk, and the call starts it directly.Start the desk instead: run kode desks start --desk dev.
409 with backend is managed by desk dev; use the deskThe call starts, stops, or deletes a workspace that belongs to a desk.Control it through its desk: start or stop the desk, or delete the workspace in the desk. Run kode desks start.
404 with not foundThe desk or workspace does not exist, or is not yours.Check the name. Use team/name for a team.