3.2. 为 Red Hat OpenShift GitOps 收集调试数据
使用 oc adm must-gather
CLI 命令收集有关与 Red Hat OpenShift GitOps 关联的集群的以下详情:
- Red Hat OpenShift GitOps Operator 的订阅和命名空间。
-
ArgoCD 对象可用的命名空间,以及这些命名空间中的对象,如
ArgoCD
,Applications
,ApplicationSets
,AppProjects
, 和configmaps
。 - 由 Red Hat OpenShift GitOps Operator 管理的命名空间列表,以及来自这些命名空间中的资源。
- 所有与 GitOps 相关的自定义资源对象和定义。
- Operator 和 Argo CD 日志。
- 警告和错误级事件。
先决条件
- 以管理员身份登录到 OpenShift Container Platform 集群。
-
已安装 OpenShift Container Platform CLI (
oc
)。 - 已安装 Red Hat OpenShift GitOps Operator。
流程
- 进入到要存储调试信息的目录。
使用 Red Hat OpenShift GitOps
must-gather
镜像运行oc adm must-gather
命令:$ oc adm must-gather --image=registry.redhat.io/openshift-gitops-1/must-gather-rhel8:<image_version_tag> 1
- 1
- GitOps 的 must-gather 镜像。
示例命令
$ oc adm must-gather --image=registry.redhat.io/openshift-gitops-1/must-gather-rhel8:v1.10.0
must-gather
工具会创建一个以当前目录中./must-gather.local
开头的新目录。例如,./must-gather.local.4157245944708210399
。从刚才创建的目录中创建压缩文件。例如,在使用 Linux 操作系统的计算机上运行以下命令:
$ tar -cvaf must-gather.tar.gz must-gather.local.4157245944708210399 1
- 1
- 将
must-gather-local.4157245944708210399
替换为实际目录名称。
- 在红帽客户门户中为您的问题单附上压缩文件。