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
Log in to the KubeSphere web console with a user who has the Project Management permission, and access your cluster.
Click Project in the left navigation pane.
In the project list, click on the right side of the project, and then select Assign Workspace from the dropdown list.
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.
Go to the selected workspace, and you can see the project on the Projects page.
Feedback
Was this page Helpful?
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.