Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: 使用tidb-operator部署的集群怎么停止?
[TiDB Usage Environment] Production Environment / Testing / PCO
[TiDB Version] 6.1
[Encountered Problem]
[Reproduction Path] What operations were performed that caused the problem
[Problem Phenomenon and Impact]
[Attachment]
Please provide the version information of each component, such as cdc/tikv, which can be obtained by executing cdc version/tikv-server --version.
Directly setting all replicas to 0 will result in the error “can’t scale in TiKV of TidbCluster [qyxtcs-dev/tidb-test], cause the number of up stores is equal to MaxReplicas in PD configuration(3), and the store in Pod tidb-test-tikv-2 which is going to be deleted is up too.” Can I first set PD’s max-replicas to 0 and then set all replicas to 0 to stop the cluster?
Is there any expert who can help answer this?
Run kubectl delete tc ${cluster_name} -n ${namespace}
to destroy the cluster.
After destruction, will the subsequent re-creation still be the original cluster?
If destroyed, the service will also be deleted, and when the service is recreated later, the service IP and other details will change.
Do you want to stop the cluster?
kubectl patch tc ${cluster_name} -n ${namespace} --type merge -p ‘{“spec”:{“paused”: true}}’
It’s useless, this won’t stop those components.
I have now set paused to true and manually deleted other components, but I am not sure if there are any side effects.
If you just want to stop, this will do.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.