搜索

6.4. GitOps 故障排除

download PDF

如果 GitOps 控制器出现问题,您可以使用 OpenShift CLI (oc)工具。

6.4.1. 使用 oc adm inspect 调试 GitOps

您可以使用 OpenShift CLI (oc)调试 GitOps。

先决条件

  • 已安装 oc 命令行工具。

流程

  1. 在 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 report。
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.