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. 监控升级状态
监控容器原生虚拟化升级状态的最佳方式是查看 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.2.1 kubevirt-hyperconverged-operator.v2.2.0 Installing 2.2.0 Replacing
VERSION REPLACES PHASE 2.2.1 kubevirt-hyperconverged-operator.v2.2.0 Installing 2.2.0 Replacing
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 可选:运行以下命令来监控所有容器原生虚拟化组件状况的聚合状态:
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