forked from spidernet-io/spiderpool
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: tao.yang <[email protected]>
- Loading branch information
1 parent
2f9117e
commit edddba9
Showing
4 changed files
with
127 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# 卸载指南 | ||
|
||
[**English**](./uninstall.md) | **简体中文** | ||
|
||
本卸载指南适用于在 Kubernetes 上运行的 Spiderpool。如果您有任何疑问,请随时通过 [Spiderpool Community](../../README-zh_CN.md#_6) 联系我们。 | ||
|
||
## 注意事项 | ||
|
||
- 在执行卸载之前,请阅读完整的卸载指南以了解所有必要的步骤。 | ||
|
||
## 卸载 | ||
|
||
了解正在运行应用,理解卸载 Spiderpool 可能对其他相关组件(如中间件) 产生的影响,请确保完全了解风险后,才开始执行卸载步骤。 | ||
|
||
1. 通过 `helm ls` 查询集群所安装的 Spiderpool | ||
|
||
```bash | ||
helm ls -A | grep -i spiderpool | ||
``` | ||
|
||
2. 通过 `helm uninstall` 卸载 Spiderpool | ||
|
||
```bash | ||
helm uninstall <spiderpool-name> --namespace <spiderpool-namespace> | ||
``` | ||
|
||
将 `<spiderpool-name>` 替换为要卸载的 Spiderpool 的名称,将 `<spiderpool-namespace>` 替换为 Spiderpool 所在的命名空间。 | ||
|
||
### v1.0.0 以上版本 | ||
|
||
在 v1.0.0 之后引入了自动清理 Spiderpool 资源的功能,它通过 `spiderpoolController.cleanup.enabled` 配置项来启用,该值默认为 `true`,您可以通过如下方式验证与 Spiderpool 相关的资源数量是否自动被清理。 | ||
|
||
```bash | ||
kubectl get spidersubnets.spiderpool.spidernet.io -o name | wc -l | ||
kubectl get spiderips.spiderpool.spidernet.io -o name | wc -l | ||
kubectl get spiderippools.spiderpool.spidernet.io -o name | wc -l | ||
kubectl get spiderreservedips.spiderpool.spidernet.io -o name | wc -l | ||
kubectl get spiderendpoints.spiderpool.spidernet.io -o name | wc -l | ||
kubectl get spidercoordinators.spiderpool.spidernet.io -o name | wc -l | ||
``` | ||
|
||
### v1.0.0 以下版本 | ||
|
||
在低于 v1.0.0 的版本中,由于 Spiderpool 的某些 CR 资源中存在 [finalizers](https://kubernetes.io/docs/concepts/overview/working-with-objects/finalizers/) ,导致 `helm uninstall` 命令无法清理干净,您需要手动清理。可获取如下清理脚本来完成清理,以确保下次部署 Spiderpool 时不会出现意外错误。 | ||
|
||
```bash | ||
wget https://raw.githubusercontent.com/spidernet-io/spiderpool/main/tools/scripts/cleanCRD.sh | ||
chmod +x cleanCRD.sh && ./cleanCRD.sh | ||
``` | ||
|
||
## FAQ | ||
|
||
删除 Spiderpool 未使用 `helm uninstall` 方式,而是通过 `kubectl delete <spiderpool 部署的 namespace>`,导致出现资源卸载残留,从而影响新的安装。您需要手动清理。可获取如下清理脚本来完成清理,以确保下次部署 Spiderpool 时不会出现意外错误。 | ||
|
||
```bash | ||
wget https://raw.githubusercontent.com/spidernet-io/spiderpool/main/tools/scripts/cleanCRD.sh | ||
chmod +x cleanCRD.sh && ./cleanCRD.sh | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Uninstall Guide | ||
|
||
**English** | [**简体中文**](./uninstall-zh_CN.md) | ||
|
||
This uninstall guide is intended for Spiderpool running on Kubernetes. If you have questions, feel free to ping us on [Spiderpool Community](../../README.md#community). | ||
|
||
## Warning | ||
|
||
- Read the full uninstall guide to understand all the necessary steps before performing them. | ||
|
||
## Uninstall Spiderpool | ||
|
||
Understand the running application and understand the impact that uninstalling Spiderpool may have on other related components (such as middleware). Please make sure you fully understand the risks before starting the uninstallation steps. | ||
|
||
1. Query the Spiderpool installed in the cluster through `helm ls` | ||
|
||
```bash | ||
helm ls -A | grep -i spiderpool | ||
``` | ||
|
||
2. Uninstall Spiderpool via `helm uninstall` | ||
|
||
```bash | ||
helm uninstall <spiderpool-name> --namespace <spiderpool-namespace> | ||
``` | ||
|
||
Replace `<spiderpool-name>` with the name of the Spiderpool you want to uninstall and `<spiderpool-namespace>` with the namespace of the Spiderpool. | ||
|
||
### Above v1.0.0 | ||
|
||
The function of automatically cleaning Spiderpool resources was introduced after v1.0.0. It is enabled through the `spiderpoolController.cleanup.enabled` configuration item. The value defaults to `true`. You can verify whether the number of resources related to Spiderpool is automatically cleared as follows. | ||
|
||
```bash | ||
kubectl get spidersubnets.spiderpool.spidernet.io -o name | wc -l | ||
kubectl get spiderips.spiderpool.spidernet.io -o name | wc -l | ||
kubectl get spiderippools.spiderpool.spidernet.io -o name | wc -l | ||
kubectl get spiderreservedips.spiderpool.spidernet.io -o name | wc -l | ||
kubectl get spiderendpoints.spiderpool.spidernet.io -o name | wc -l | ||
kubectl get spidercoordinators.spiderpool.spidernet.io -o name | wc -l | ||
``` | ||
|
||
### Below v1.0.0 | ||
|
||
In versions lower than v1.0.0, Some CR resources having [finalizers](https://kubernetes.io/docs/concepts/overview/working-with-objects/finalizers/) prevents complete cleanup via `helm uninstall`. You can download the cleaning script below to perform the necessary cleanup and avoid any unexpected errors during future deployments of Spiderpool. | ||
|
||
```bash | ||
wget https://raw.githubusercontent.com/spidernet-io/spiderpool/main/tools/scripts/cleanCRD.sh | ||
chmod +x cleanCRD.sh && ./cleanCRD.sh | ||
``` | ||
|
||
## FAQ | ||
|
||
Spiderpool was not deleted using the `helm uninstall` method, but through `kubectl delete <spiderpool deployed namespace>`, which resulted in resource uninstallation residues, thus affecting the new installation. You need to clean it up manually. You can get the following cleanup script to complete the cleanup to ensure that there will be no unexpected errors when you deploy Spiderpool next time. | ||
|
||
```bash | ||
wget https://raw.githubusercontent.com/spidernet-io/spiderpool/main/tools/scripts/cleanCRD.sh | ||
chmod +x cleanCRD.sh && ./cleanCRD.sh | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters