This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.4.3. 监控升级状态
监控 OpenShift Virtualization 升级状态的最佳方式是查看 ClusterServiceVersion(CSV)PHASE
。此外您还可在 web 控制台中,或运行此处提供的命令来监控 CSV 状况。
注意
PHASE
和状况值均是基于可用信息的近似值。
先决条件
-
以具有
cluster-admin
角色的用户身份登录集群。 -
安装 OpenShift CLI(
oc
)。
流程
运行以下命令:
oc get csv
$ oc get csv
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 查看输出,检查
PHASE
字段。例如:输出示例
VERSION REPLACES PHASE 2.5.0 kubevirt-hyperconverged-operator.v2.4.3 Installing 2.4.3 Replacing
VERSION REPLACES PHASE 2.5.0 kubevirt-hyperconverged-operator.v2.4.3 Installing 2.4.3 Replacing
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 可选:运行以下命令来监控所有 OpenShift Virtualization 组件状况的聚合状态:
oc get hco -n openshift-cnv kubevirt-hyperconverged \ -o=jsonpath='{range .status.conditions[*]}{.type}{"\t"}{.status}{"\t"}{.message}{"\n"}{end}'
$ oc get hco -n openshift-cnv kubevirt-hyperconverged \ -o=jsonpath='{range .status.conditions[*]}{.type}{"\t"}{.status}{"\t"}{.message}{"\n"}{end}'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 成功升级后会输出以下内容:
输出示例
ReconcileComplete True Reconcile completed successfully Available True Reconcile completed successfully Progressing False Reconcile completed successfully Degraded False Reconcile completed successfully Upgradeable True Reconcile completed successfully
ReconcileComplete True Reconcile completed successfully Available True Reconcile completed successfully Progressing False Reconcile completed successfully Degraded False Reconcile completed successfully Upgradeable True Reconcile completed successfully
Copy to Clipboard Copied! Toggle word wrap Toggle overflow