From b0f9797b75c31f66a3eac360eeb84bc932df4db0 Mon Sep 17 00:00:00 2001 From: zhuxiujuan28 <562873187@qq.com> Date: Wed, 11 Dec 2024 14:54:06 +0800 Subject: [PATCH] add new file from 4.1.2 Signed-off-by: zhuxiujuan28 <562873187@qq.com> --- .../01-install-components.adoc | 2 +- .../04-projects/01-create-a-project.adoc | 8 ++- .../05-edit-cluster-configuration.adoc | 26 +++++++++ ...econfig.adoc => 07-update-kubeconfig.adoc} | 2 +- ...r.adoc => 09-remove-a-member-cluster.adoc} | 2 +- .../11-add-a-removed-member-cluster.adoc | 30 +++++++++++ .../08-unbind-a-project-from-a-workspace.adoc | 51 ++++++++++++++++++ .../v4.1/06-extension-user-guide/_index.adoc | 2 - .../04-projects/01-create-a-project.adoc | 8 ++- .../05-edit-cluster-configuration.adoc | 27 ++++++++++ ...econfig.adoc => 07-update-kubeconfig.adoc} | 7 ++- ...r.adoc => 09-remove-a-member-cluster.adoc} | 14 ++--- .../11-add-a-removed-member-cluster.adoc | 33 ++++++++++++ .../08-unbind-a-project-from-a-workspace.adoc | 53 +++++++++++++++++++ 14 files changed, 246 insertions(+), 19 deletions(-) create mode 100644 content/en/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/05-edit-cluster-configuration.adoc rename content/en/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/{05-update-kubeconfig.adoc => 07-update-kubeconfig.adoc} (99%) rename content/en/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/{06-remove-a-member-cluster.adoc => 09-remove-a-member-cluster.adoc} (99%) create mode 100644 content/en/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/11-add-a-removed-member-cluster.adoc create mode 100644 content/en/docs/v4.1/08-workspace-management/04-projects/08-unbind-a-project-from-a-workspace.adoc create mode 100644 content/zh/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/05-edit-cluster-configuration.adoc rename content/zh/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/{05-update-kubeconfig.adoc => 07-update-kubeconfig.adoc} (86%) rename content/zh/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/{06-remove-a-member-cluster.adoc => 09-remove-a-member-cluster.adoc} (93%) create mode 100644 content/zh/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/11-add-a-removed-member-cluster.adoc create mode 100644 content/zh/docs/v4.1/08-workspace-management/04-projects/08-unbind-a-project-from-a-workspace.adoc diff --git a/content/en/docs/v4.1/06-extension-user-guide/01-install-components.adoc b/content/en/docs/v4.1/06-extension-user-guide/01-install-components.adoc index 0a54d02c4..819a9a98c 100644 --- a/content/en/docs/v4.1/06-extension-user-guide/01-install-components.adoc +++ b/content/en/docs/v4.1/06-extension-user-guide/01-install-components.adoc @@ -22,7 +22,7 @@ You should have the **platform-admin** role on the {ks_product-en} platform. For endif::[] ifeval::["{file_output_type}" == "pdf"] -You should have the **platform-admin** role on the {ks_product-en} platform. For more information, please refer to the {ks_product-en} User and Role Management Guide. +You should have the **platform-admin** role on the {ks_product-en} platform. For more information, please refer to the {ks_product-en} Users and Roles. endif::[] == Installation Steps diff --git a/content/en/docs/v4.1/07-cluster-management/04-projects/01-create-a-project.adoc b/content/en/docs/v4.1/07-cluster-management/04-projects/01-create-a-project.adoc index b80e97cf2..633860e9e 100644 --- a/content/en/docs/v4.1/07-cluster-management/04-projects/01-create-a-project.adoc +++ b/content/en/docs/v4.1/07-cluster-management/04-projects/01-create-a-project.adoc @@ -47,8 +47,12 @@ include::../../../_custom-en/clusterManagement/projects/projects-para-aliasDescr // Note include::../../../../_ks_components-en/admonitions/note.adoc[] -* Once a project is assigned to a workspace, you are not allowed to change its workspace. - +ifeval::["{file_output_type}" == "html"] * Once the project is created, you can invite users to join the project and deploy services within it. +endif::[] + +ifeval::["{file_output_type}" == "pdf"] +* Once the project is created, you can invite users to join the project and deploy services within it. For more information, please refer to the {ks_product-en} Project Management Guide. +endif::[] include::../../../../_ks_components-en/admonitions/admonEnd.adoc[] \ No newline at end of file diff --git a/content/en/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/05-edit-cluster-configuration.adoc b/content/en/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/05-edit-cluster-configuration.adoc new file mode 100644 index 000000000..d0d87ee59 --- /dev/null +++ b/content/en/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/05-edit-cluster-configuration.adoc @@ -0,0 +1,26 @@ +--- +title: "Edit Cluster Configuration" +keywords: "Kubernetes, {ks_product-en}, multi-cluster management, cluster, edit cluster configuration" +description: "Introduce how to edit cluster configuration." +weight: 05 +--- + +:ks_permission: **Cluster Management** + +This section introduces how to edit the cluster configuration of a member cluster, i.e., adjust the ks-agent configuration parameters. + +In addition to configuring the cluster when adding a member cluster, you can also edit the cluster configuration after the member cluster has been added. + +== Prerequisites + +You should have pass:a,q[{ks_permission}] permissions on the {ks_product-en} platform. + +== Steps + +include::../../../../_custom-en/platformManagement/platformManagement-oper-logIn.adoc[] + +. Click **Cluster Management**. + +. Click image:/images/ks-qkcp/zh/icons/more.svg[more,18,18] on the right side of the cluster you want to edit, and then select **Edit Configuration** from the dropdown list. + +. Enter the ks-agent information in the **Edit Configuration** dialog box, and then click **OK**. \ No newline at end of file diff --git a/content/en/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/05-update-kubeconfig.adoc b/content/en/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/07-update-kubeconfig.adoc similarity index 99% rename from content/en/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/05-update-kubeconfig.adoc rename to content/en/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/07-update-kubeconfig.adoc index 0415d7e58..1e19526fe 100644 --- a/content/en/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/05-update-kubeconfig.adoc +++ b/content/en/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/07-update-kubeconfig.adoc @@ -3,7 +3,7 @@ title: "Update kubeconfig" linkTitle: "Update kubeconfig" keywords: "Kubernetes, KubeSphere, Multi-Cluster Management, Cluster, Update kubeconfig" description: "Learn how to update the kubeconfig information of member clusters." -weight: 05 +weight: 07 --- diff --git a/content/en/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/06-remove-a-member-cluster.adoc b/content/en/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/09-remove-a-member-cluster.adoc similarity index 99% rename from content/en/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/06-remove-a-member-cluster.adoc rename to content/en/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/09-remove-a-member-cluster.adoc index 10b163e24..eff4333d4 100644 --- a/content/en/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/06-remove-a-member-cluster.adoc +++ b/content/en/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/09-remove-a-member-cluster.adoc @@ -3,7 +3,7 @@ title: "Remove Member Clusters" linkTitle: "Remove Member Clusters" keywords: "Kubernetes, KubeSphere, Multi-Cluster Management, Cluster, Remove Member Clusters" description: "Learn how to remove member clusters." -weight: 06 +weight: 09 --- :ks_menu: **Cluster Management** diff --git a/content/en/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/11-add-a-removed-member-cluster.adoc b/content/en/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/11-add-a-removed-member-cluster.adoc new file mode 100644 index 000000000..f32ec0604 --- /dev/null +++ b/content/en/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/11-add-a-removed-member-cluster.adoc @@ -0,0 +1,30 @@ +--- +title: "Re-host a Member Cluster to Another Host Cluster" +keywords: "Kubernetes, {ks_product-en}, multi-cluster management, cluster, re-host member cluster" +description: "How to re-host a removed member cluster to a new host cluster." +weight: 11 +--- + +This section introduces how to re-host a removed member cluster to another host cluster. + +== Unbinding a Cluster in Normal State + +If a member cluster is removed while in a normal state, no additional operations are required. The member cluster can be directly re-hosted by another host cluster. For detailed steps, please refer to link:../01-add-a-member-cluster[Add a Member Cluster]. + +== Unbinding a Cluster in Abnormal State + +If a member cluster is removed while in an abnormal state, run the following command on the member cluster to clear the hosting information. After that, the cluster can be normally re-hosted by another host cluster. + +[,bash] +---- +kubectl patch ns kubesphere-system --type merge -p '{"metadata":{"annotations": null}}' +---- + +== Clean Up Multi-Cluster Configuration Data + +After a cluster is unbound, the original resources and multi-cluster configuration data in the cluster will not be automatically cleared. If the unbound cluster has workspace-related configurations, run the following command to manually clean up the configuration data in the removed cluster before re-hosting. + +[,bash] +---- +for ns in $(kubectl get ns --field-selector status.phase!=Terminating -o jsonpath='{.items[*].metadata.name}'); do kubectl label ns $ns kubesphere.io/workspace- && kubectl patch ns $ns --type merge -p '{"metadata":{"ownerReferences":[]}}'; done +---- \ No newline at end of file diff --git a/content/en/docs/v4.1/08-workspace-management/04-projects/08-unbind-a-project-from-a-workspace.adoc b/content/en/docs/v4.1/08-workspace-management/04-projects/08-unbind-a-project-from-a-workspace.adoc new file mode 100644 index 000000000..7d874e71d --- /dev/null +++ b/content/en/docs/v4.1/08-workspace-management/04-projects/08-unbind-a-project-from-a-workspace.adoc @@ -0,0 +1,51 @@ +--- +title: "Move a Project to Another Workspace" +keywords: "Kubernetes, {ks_product-en}, workspace management, project, unbind project" +description: "Introduce how to unbind a project and move it to another workspace." +weight: 08 +--- + +:ks_permission: **Project Management** +:ks_navigation: **Project** + +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. + +[,bash] +---- +kubectl label ns kubesphere.io/workspace- && kubectl patch ns -p '{"metadata":{"ownerReferences":[]}}' --type=merge +---- + +[.admon.note,cols="a"] +|=== +|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. + +[,bash] +---- +kubectl delete rolebindings.iam.kubesphere.io -n --all +---- + +== 3. Re-host to a New Workspace + +include::../../../_custom-en/clusterManagement/clusterManagement-oper-openClusterPage.adoc[] + ++ + +include::../../../../_ks_components-en/oper-navigate.adoc[] + +. In the project list, click image:/images/ks-qkcp/zh/icons/more.svg[more,18,18] 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. \ No newline at end of file diff --git a/content/zh/docs/v4.1/06-extension-user-guide/_index.adoc b/content/zh/docs/v4.1/06-extension-user-guide/_index.adoc index c1bea68c2..90765380c 100644 --- a/content/zh/docs/v4.1/06-extension-user-guide/_index.adoc +++ b/content/zh/docs/v4.1/06-extension-user-guide/_index.adoc @@ -11,5 +11,3 @@ icon: "/images/docs/common/docs.svg" 本节介绍如何安装和管理扩展组件。 KubeSphere 扩展组件,是构建在 KubeSphere LuBan 之上、用以扩展并增强 KubeSphere 产品能力、进一步满足企业各类型业务需求的应用形态。{ks_product_right}安装完成后默认仅启用了核心组件。建议您在扩展中心安装扩展组件以充分利用{ks_product_both}的功能特性。 - -// 有关如何使用各个扩展组件的更多信息,请参阅《{ks_product_right}扩展组件使用指南》。 diff --git a/content/zh/docs/v4.1/07-cluster-management/04-projects/01-create-a-project.adoc b/content/zh/docs/v4.1/07-cluster-management/04-projects/01-create-a-project.adoc index 9bc711319..da944eb6f 100644 --- a/content/zh/docs/v4.1/07-cluster-management/04-projects/01-create-a-project.adoc +++ b/content/zh/docs/v4.1/07-cluster-management/04-projects/01-create-a-project.adoc @@ -55,8 +55,14 @@ include::../../../_custom/clusterManagement/projects/projects-para-aliasDescript // Note include::../../../../_ks_components/admonitions/note.adoc[] -* 项目被分配到企业空间后不允许变更项目所属的企业空间。 +// * 项目被分配到企业空间后不允许变更项目所属的企业空间。 +ifeval::["{file_output_type}" == "html"] * 项目创建完成后,您可以邀请用户加入项目并在项目中部署业务。 +endif::[] + +ifeval::["{file_output_type}" == "pdf"] +* 项目创建完成后,您可以邀请用户加入项目并在项目中部署业务。有关更多信息,请参阅 《{ks_product_right}项目管理指南》。 +endif::[] include::../../../../_ks_components/admonitions/admonEnd.adoc[] diff --git a/content/zh/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/05-edit-cluster-configuration.adoc b/content/zh/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/05-edit-cluster-configuration.adoc new file mode 100644 index 000000000..72a10639f --- /dev/null +++ b/content/zh/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/05-edit-cluster-configuration.adoc @@ -0,0 +1,27 @@ +--- +title: "编辑集群配置" +keywords: "Kubernetes, {ks_product}, 多集群管理, 集群, 编辑集群配置" +description: "介绍如何编辑集群配置。" +weight: 05 +--- + +:ks_permission: **集群管理** + + +本节介绍如何编辑成员集群的集群配置,即调整 ks-agent 配置参数。 + +除了在添加成员集群时进行集群配置外,成员集群被添加后,也可以编辑集群配置。 + +== 前提条件 + +您需要在{ks_product_both}平台具有pass:a,q[{ks_permission}]权限。 + +== 操作步骤 + +include::../../../../_custom/platformManagement/platformManagement-oper-logIn.adoc[] + +. 点击**集群管理**。 + +. 在需要操作的集群右侧点击image:/images/ks-qkcp/zh/icons/more.svg[more,18,18],然后在下拉列表中选择**编辑配置**。 + +. 在**编辑配置**对话框输入 ks-agent 的信息,然后点击**确定**。 \ No newline at end of file diff --git a/content/zh/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/05-update-kubeconfig.adoc b/content/zh/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/07-update-kubeconfig.adoc similarity index 86% rename from content/zh/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/05-update-kubeconfig.adoc rename to content/zh/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/07-update-kubeconfig.adoc index 4fe794845..1fcdf07d4 100644 --- a/content/zh/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/05-update-kubeconfig.adoc +++ b/content/zh/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/07-update-kubeconfig.adoc @@ -1,9 +1,8 @@ --- title: "更新 kubeconfig" -linkTitle: "更新 kubeconfig" -keywords: "Kubernetes, KubeSphere, 多集群管理, 集群, 更新 kubeconfig" +keywords: "Kubernetes, {ks_product}, 多集群管理, 集群, 更新 kubeconfig" description: "介绍如何更新成员集群 kubeconfig 信息。" -weight: 05 +weight: 07 --- @@ -25,7 +24,7 @@ include::../../../../../_ks_components/admonitions/admonEnd.adoc[] == 前提条件 -include::../../../../_custom/platformManagement/platformManagement-prer-requiredPermission_v4.adoc[] +您需要在{ks_product_both}平台具有pass:a,q[{ks_permission}]权限。 diff --git a/content/zh/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/06-remove-a-member-cluster.adoc b/content/zh/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/09-remove-a-member-cluster.adoc similarity index 93% rename from content/zh/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/06-remove-a-member-cluster.adoc rename to content/zh/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/09-remove-a-member-cluster.adoc index 84ed1422a..62ce37e9b 100644 --- a/content/zh/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/06-remove-a-member-cluster.adoc +++ b/content/zh/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/09-remove-a-member-cluster.adoc @@ -1,9 +1,8 @@ --- title: "移除成员集群" -linkTitle: "移除成员集群" -keywords: "Kubernetes, KubeSphere, 多集群管理, 集群, 移除成员集群" +keywords: "Kubernetes, {ks_product}, 多集群管理, 集群, 移除成员集群" description: "介绍如何移除成员集群。" -weight: 06 +weight: 09 --- :ks_menu: **集群管理** @@ -70,10 +69,11 @@ include::../../../../_custom/platformManagement/extensionManagement/extensionMan + -- // Bash -[,bash] ----- +include::../../../../../_ks_components/code/bash.adoc[] + kubectl delete cluster ----- + +include::../../../../../_ks_components/code/codeEnd.adoc[] -- @@ -84,4 +84,4 @@ kubectl delete cluster [,bash] ---- for ns in $(kubectl get ns --field-selector status.phase!=Terminating -o jsonpath='{.items[*].metadata.name}'); do kubectl label ns $ns kubesphere.io/workspace- && kubectl patch ns $ns --type merge -p '{"metadata":{"ownerReferences":[]}}'; done ----- +---- \ No newline at end of file diff --git a/content/zh/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/11-add-a-removed-member-cluster.adoc b/content/zh/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/11-add-a-removed-member-cluster.adoc new file mode 100644 index 000000000..cba1026a2 --- /dev/null +++ b/content/zh/docs/v4.1/07-cluster-management/10-multi-cluster-management/01-clusters/11-add-a-removed-member-cluster.adoc @@ -0,0 +1,33 @@ +--- +title: "纳管成员集群到其他 host 集群" +keywords: "Kubernetes, {ks_product}, 多集群管理, 集群, 重新纳管成员集群" +description: "如何将被移除的成员集群重新纳管到新的 host 集群。。" +weight: 11 +--- + +本节介绍如何将被移除的成员集群重新纳管到其他 host 集群。 + + +== 集群正常状态解绑 + +若成员集群在正常状态下被移除,无需额外操作,成员集群可以直接被其它 host 集群纳管,详细步骤请参阅link:../01-add-a-member-cluster[添加成员集群]。 + + +== 集群异常状态解绑 + +若成员集群在异常状态下被移除,在成员集群上执行下面的命令来清除集群的纳管信息,之后集群可以正常被其它 host 集群纳管。 + +[,bash] +---- +kubectl patch ns kubesphere-system --type merge -p '{"metadata":{"annotations": null}}' +---- + +== 清理多集群配置数据 + +集群被解绑后,集群中原有的资源和多集群配置数据不会被自动清除。如果被解绑集群存在企业空间相关配置,执行以下命令手动清理被移除集群中的配置数据后再进行纳管。 + +[,bash] +---- +for ns in $(kubectl get ns --field-selector status.phase!=Terminating -o jsonpath='{.items[*].metadata.name}'); do kubectl label ns $ns kubesphere.io/workspace- && kubectl patch ns $ns --type merge -p '{"metadata":{"ownerReferences":[]}}'; done +---- + diff --git a/content/zh/docs/v4.1/08-workspace-management/04-projects/08-unbind-a-project-from-a-workspace.adoc b/content/zh/docs/v4.1/08-workspace-management/04-projects/08-unbind-a-project-from-a-workspace.adoc new file mode 100644 index 000000000..2ece924e5 --- /dev/null +++ b/content/zh/docs/v4.1/08-workspace-management/04-projects/08-unbind-a-project-from-a-workspace.adoc @@ -0,0 +1,53 @@ +--- +title: "将项目纳管到其他企业空间" +keywords: "Kuberentes, {ks_product}, 企业空间管理, 项目, 解绑项目" +description: "介绍如何解绑项目并纳管到其他企业空间。" +weight: 08 +--- + +:ks_permission: **项目管理** +:ks_navigation: **项目** + + +本节介绍如何将项目与当前企业空间解绑,并重新纳管到其他企业空间。 + + +== 1. 解绑项目 + +在项目所在的集群中,执行以下命令,解除项目和所属企业空间的关系。 + +[,bash] +---- +kubectl label ns kubesphere.io/workspace- && kubectl patch ns -p '{"metadata":{"ownerReferences":[]}}' --type=merge +---- + +[.admon.note,cols="a"] +|=== +|说明 + +| +以上命令会移除项目与企业空间关联的标签并移除 ownerReferences。 +|=== + +== 2. 移除项目成员 + +在项目所在的集群中,执行以下命令,移除项目下所有的成员。 + +[,bash] +---- +kubectl delete rolebindings.iam.kubesphere.io -n --all +---- + +== 3. 纳管到新的企业空间 + +include::../../../_custom/clusterManagement/clusterManagement-oper-openClusterPage.adoc[] + ++ + +include::../../../../_ks_components/oper-navigate.adoc[] + +. 在项目列表中,在项目右侧点击image:/images/ks-qkcp/zh/icons/more.svg[more,18,18],然后在下拉列表中选择**分配企业空间**。 + +. 在**分配企业空间**对话框,设置项目所属的企业空间,并选择一个企业空间成员作为项目管理员,然后点击**确定**。 + +. 进入选定的企业空间,即可在**项目**页面看到该项目。 \ No newline at end of file