|NO.Z.00252|——————————|CloudNative|——|KuberNetes&存储进阶.V18|——|Ceph.v12|ceph测试|测试数据清理|

一、测试数据清理
### --- 清除创建的deployment,registry

[root@k8s-master01 ceph]#  kubectl  delete deploy kube-registry  -n kube-system
deployment.apps "kube-registry" deleted
[root@k8s-master01 ceph]#  kubectl get deploy
NAME              READY   UP-TO-DATE   AVAILABLE   AGE
wordpress-mysql   1/1     1            1           123m
[root@k8s-master01 ceph]#  kubectl delete deploy wordpress-mysql -n default
deployment.apps "wordpress-mysql" deleted
二、删除PVC之前需要把挂载了该PVC的资源先删掉,删除PVC之后PV也会被删除
[root@k8s-master01 ceph]# kubectl  delete pvc mysql-pv-claim rbd-pvc-clone -n default
persistentvolumeclaim "mysql-pv-claim" deleted
persistentvolumeclaim "rbd-pvc-clone" deleted
[root@k8s-master01 ceph]#  kubectl delete pvc  cephfs-pvc -n kube-system
persistentvolumeclaim "cephfs-pvc" deleted
[root@k8s-master01 ceph]# kubectl  get pv
No resources found
### --- 此清理只是清理测试用的数据,
~~~     没有清理之前创建的各类Class和ceph的存储池(因为之后还要在生产用),
~~~     如果需要清理整个集群,请参考:

~~~     https://rook.io/docs/rook/v1.5/ceph-teardown.html

 
 
 
 
 
 
 
 
 

Walter Savage Landor:strove with none,for none was worth my strife.Nature I loved and, next to Nature, Art:I warm'd both hands before the fire of life.It sinks, and I am ready to depart
                                                                                                                                                   ——W.S.Landor

 

 

posted on 2022-03-31 13:21  yanqi_vip  阅读(35)  评论(0)    收藏  举报

导航