Workspace Overview

    It is a best practice to create a new workspace for tenants (excluding cluster administrators). A same tenant can work in multiple workspaces, while a workspace allows multiple tenants to access it in different ways.

    This tutorial demonstrates how to create and delete a workspace.

    You have a user granted the role of , such as in Create Workspaces, Projects, Users and Roles.

    1. Log in to the web console of KubeSphere as . Click Platform on the upper-left corner, and then select Access Control. On the Workspaces page, click Create.

      Note

      By default, you have at least one workspace in the list which contains all system projects.

    2. For single-node cluster, on the Basic Information page, specify a name for the workspace and select an administrator from the drop-down list. Click Create.

      • Name: Set a name for the workspace which serves as a unique identifier.
      • Alias: An alias name for the workspace.
      • Description: A brief introduction of the workspace.
    3. The workspace is displayed in the workspace list after it is created.

    4. Click the workspace and you can see resource status of the workspace on the Overview page.

    In KubeSphere, you use a workspace to group and manage different projects, which means the lifecycle of a project is dependent on the workspace. More specifically, all the projects and related resources in a workspace will be deleted if the workspace is deleted.

    Before you delete a workspace, decide whether you want to unbind some key projects.

    To delete a workspace while preserving some projects in it, run the following command first:

    Note

    The command above removes labels associated with the workspace and removes ownerReferences. After that, you can .

    Delete a workspace on the console

    Note

    Be extremely cautious about deleting a workspace if you use kubectl to delete workspace resource objects directly.

    1. In your workspace, go to Basic Information under Workspace Settings. On the Basic Information page, you can see the general information of the workspace, such as the number of projects and members.

      Note

      On this page, you can click Edit Information to change the basic information of the workspace (excluding the workspace name) and turn on/off .