From e6a9fb0946ab36db3dfdb6506761288b6576c38d Mon Sep 17 00:00:00 2001 From: changluyi <47097611+changluyi@users.noreply.github.com> Date: Mon, 9 Oct 2023 13:31:51 +0800 Subject: [PATCH] add ovn-ic clean (#126) * add ovn-ic clean * fix kubectl-ko to kubectl ko --- docs/advance/with-ovn-ic.en.md | 32 +++++++++++++++++++++++++++++++- docs/advance/with-ovn-ic.md | 32 +++++++++++++++++++++++++++++++- 2 files changed, 62 insertions(+), 2 deletions(-) diff --git a/docs/advance/with-ovn-ic.en.md b/docs/advance/with-ovn-ic.en.md index ab0ca4c44..8dbb6e292 100644 --- a/docs/advance/with-ovn-ic.en.md +++ b/docs/advance/with-ovn-ic.en.md @@ -254,7 +254,37 @@ kubectl -n kube-system delete cm ovn-ic-config Delete `ts` logical switch: ```bash -kubectl-ko nbctl ls-del ts +kubectl ko nbctl ls-del ts ``` Repeat the same steps at the peer cluster. + +## Clean OVN-IC + +Delete the `ovn-ic-config` Configmap for all clusters: + +```bash +kubectl -n kube-system delete cm ovn-ic-config +``` + +Delete all clusters' `ts` logical switches: + +```bash +kubectl ko nbctl ls-del ts +``` + +Delete the cluster interconnect controller. If it is a high-availability OVN-IC database deployment, all need to be cleaned up. + +If the controller is `docker` deploy execute command: + +```bash +docker stop ovn-ic-db +docker rm ovn-ic-db +``` + +If the controller is `containerd` deploy the command: + +```bash +ctr -n k8s.io task kill ovn-ic-db +ctr -n k8s.io containers rm ovn-ic-db +``` diff --git a/docs/advance/with-ovn-ic.md b/docs/advance/with-ovn-ic.md index 4feb1b119..0e7c3f902 100644 --- a/docs/advance/with-ovn-ic.md +++ b/docs/advance/with-ovn-ic.md @@ -245,7 +245,7 @@ kubectl -n kube-system delete cm ovn-ic-config 删除 `ts` 逻辑交换机: ```bash -kubectl-ko nbctl ls-del ts +kubectl ko nbctl ls-del ts ``` 在对端集群重复同样的步骤。 @@ -258,3 +258,33 @@ kubectl-ko nbctl ls-del ts ```bash ovn-appctl -t ovn-controller inc-engine/recompute ``` + +## 清理集群互联 + +删除所有集群的 `ovn-ic-config` Configmap: + +```bash +kubectl -n kube-system delete cm ovn-ic-config +``` + +删除所有集群的 `ts` 逻辑交换机: + +```bash +kubectl ko nbctl ls-del ts +``` + +删除集群互联控制器,如果是高可用 OVN-IC 数据库部署,需要都清理掉。 + +如果控制器是 `docker` 部署执行命令: + +```bash +docker stop ovn-ic-db +docker rm ovn-ic-db +``` + +如果控制器是 `containerd` 部署执行命令: + +```bash +ctr -n k8s.io task kill ovn-ic-db +ctr -n k8s.io containers rm ovn-ic-db +```