Skip to content

Assign a Cluster to Multiple Workspaces (Tenants)

Cluster resources are typically managed by operations personnel. When allocating resources, they need to create namespaces to isolate resources and set resource quotas. This method has a drawback: if the business volume of the enterprise is large, manually allocating resources requires a significant amount of work, and flexibly adjusting resource quotas can also be challenging.

To address this, DCE introduces the concept of workspaces. By sharing resources, workspaces can provide higher-dimensional resource quota capabilities, allowing workspaces (tenants) to self-create Kubernetes namespaces under resource quotas.

For example, if you want several departments to share different clusters:

Cluster01 (Normal) Cluster02 (High Availability)
Department (Workspace) A 50 quota 10 quota
Department (Workspace) B 100 quota 20 quota

You can follow the process below to share clusters with multiple departments/workspaces/tenants:

graph TB

preparews[Prepare Workspace] --> preparecs[Prepare Cluster]
--> share[Share Cluster to Workspace]
--> judge([Judge Workspace Remaining Quota])
judge -.Greater than remaining quota.->modifyns[Modify Namespace Quota]
judge -.Less than remaining quota.->createns[Create Namespace]

classDef plain fill:#ddd,stroke:#fff,stroke-width:1px,color:#000;
classDef k8s fill:#326ce5,stroke:#fff,stroke-width:1px,color:#fff;
classDef cluster fill:#fff,stroke:#bbb,stroke-width:1px,color:#326ce5;

class preparews,preparecs,share, cluster;
class judge plain
class modifyns,createns k8s

click preparews "https://docs.daocloud.io/en/ghippo/user-guide/workspace/cluster-for-multiws/#prepare-a-workspace"
click preparecs "https://docs.daocloud.io/en/ghippo/user-guide/workspace/cluster-for-multiws/#prepare-a-cluster"
click share "https://docs.daocloud.io/en/ghippo/user-guide/workspace/cluster-for-multiws/#add-a-cluster-to-the-workspace"
click createns "https://docs.daocloud.io/en/amamba/user-guide/namespace/namespace/#create-a-namespace"
click modifyns "https://docs.daocloud.io/en/amamba/user-guide/namespace/namespace/#namespace-quotas"

Prepare a Workspace

Workspaces are designed to meet multi-tenant usage scenarios, forming isolated resource environments based on clusters, cluster namespaces, meshes, mesh namespaces, multi-cloud, multi-cloud namespaces, and other resources. Workspaces can be mapped to various concepts such as projects, tenants, enterprises, and suppliers.

  1. Log in to DCE 5.0 with a user having the admin/folder admin role and click Global Management at the bottom of the left navigation bar.

    Global Management

  2. Click Workspaces and Folders in the left navigation bar, then click the Create Workspace button at the top right.

    Create Workspace

  3. Fill in the workspace name, folder, and other information, then click OK to complete the creation of the workspace.

    Confirm

Prepare a Cluster

Workspaces are designed to meet multi-tenant usage scenarios, forming isolated resource environments based on clusters, cluster namespaces, meshes, mesh namespaces, multi-cloud, multi-cloud namespaces, and other resources. Workspaces can be mapped to various concepts such as projects, tenants, enterprises, and suppliers.

Follow these steps to prepare a cluster.

  1. Click Container Management at the bottom of the left navigation bar, then select Clusters .

    Container Management

  2. Click Create Cluster to create a cluster or click Integrate Cluster to integrate a cluster.

Add Cluster to Workspace

Return to Global Management to add clusters to the workspace.

  1. Click Global Management -> Workspaces and Folders -> Shared Resources, then click a workspace name and click the New Shared Resource button.

    Add Resource

  2. Select the cluster, fill in the resource quota, and click OK .

    Add Resource

Next Step: After allocating cluster resources to multiple workspaces, users can go to Workbench to create namespaces and deploy applications in these workspaces.

Comments