11.5. 使用 oc adm inspect 调试 GitOps
如果您的 Argo CD for MicroShift Red Hat OpenShift GitOps 控制器有问题,您可以使用 OpenShift CLI (oc)工具检查它是否有错误。
先决条件
-
已安装
oc命令行工具。
流程
在 GitOps 命名空间中运行时运行
oc adm inspect命令:$ oc adm inspect ns/openshift-gitops输出示例
Gathering data for ns/openshift-gitops... W0501 20:34:35.978508 57625 util.go:118] the server doesn't have a resource type egressfirewalls, skipping the inspection W0501 20:34:35.980881 57625 util.go:118] the server doesn't have a resource type egressqoses, skipping the inspection W0501 20:34:36.040664 57625 util.go:118] the server doesn't have a resource type servicemonitors, skipping the inspection Wrote inspect data to inspect.local.2673575938140296280.
后续步骤
-
如果
oc adm inspect没有显示您需要的信息,您可以运行 sos 报告。