10.3. 暂停托管集群和托管的 control plane 的协调
如果您是集群管理员,您可以暂停托管集群和托管的控制平面的协调。当您备份和恢复 etcd 数据库或需要调试托管集群或托管的 control plane 的问题时,您可能希望暂停协调。
流程
- 要暂停托管集群和托管的 control plane 的协调,请填充 - HostedCluster资源的- pausedUntil字段。- 要暂停协调直到特定时间,请输入以下命令: - oc patch -n <hosted_cluster_namespace> hostedclusters/<hosted_cluster_name> -p '{"spec":{"pausedUntil":"<timestamp>"}}' --type=merge- $ oc patch -n <hosted_cluster_namespace> hostedclusters/<hosted_cluster_name> -p '{"spec":{"pausedUntil":"<timestamp>"}}' --type=merge- 1 - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- 以 RFC339 格式指定时间戳,例如2024-03-03T03:28:48Z。协调会暂停,直到经过了指定的时间。
 
- 要无限期暂停协调,请输入以下命令: - oc patch -n <hosted_cluster_namespace> hostedclusters/<hosted_cluster_name> -p '{"spec":{"pausedUntil":"true"}}' --type=merge- $ oc patch -n <hosted_cluster_namespace> hostedclusters/<hosted_cluster_name> -p '{"spec":{"pausedUntil":"true"}}' --type=merge- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 协调会暂停,直到您从 - HostedCluster资源中删除了字段。- 当为 - HostedCluster资源填充暂停协调字段时,该字段会自动添加到关联的- HostedControlPlane资源中。
 
- 要删除 - pausedUntil字段,请输入以下 patch 命令:- oc patch -n <hosted_cluster_namespace> hostedclusters/<hosted_cluster_name> -p '{"spec":{"pausedUntil":null}}' --type=merge- $ oc patch -n <hosted_cluster_namespace> hostedclusters/<hosted_cluster_name> -p '{"spec":{"pausedUntil":null}}' --type=merge- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow