< img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=3131724&fmt=gif" />

Move a Project to Another Workspace

This section introduces how to unbind a project from the current workspace and re-host it to another workspace.

1. Unbind the Project

In the cluster where the project is located, execute the following command to remove the relationship between the project and its associated workspace.

kubectl label ns <namespace> kubesphere.io/workspace- && kubectl patch ns <namespace>   -p '{"metadata":{"ownerReferences":[]}}' --type=merge
Note

The above command will remove the labels associated with the workspace and the ownerReferences.

2. Remove Project Members

In the cluster where the project is located, execute the following command to remove all members under the project.

kubectl delete rolebindings.iam.kubesphere.io -n <namespace> --all

3. Re-host to a New Workspace

  1. Log in to the KubeSphere web console with a user who has the Project Management permission, and access your cluster.

  2. Click Project in the left navigation pane.

  3. In the project list, click more on the right side of the project, and then select Assign Workspace from the dropdown list.

  4. In the Assign Workspace dialog box, set the workspace to which the project belongs, and select a workspace member as the project administrator, then click OK.

  5. Go to the selected workspace, and you can see the project on the Projects page.

Receive the latest news, articles and updates from KubeSphere


Thanks for the feedback. If you have a specific question about how to use KubeSphere, ask it on Slack. Open an issue in the GitHub repo if you want to report a problem or suggest an improvement.