13.2. must-gather 过程
请参阅以下流程来使用 must-gather 命令:
-
了解
must-gather命令以及按照 Red Hat OpenShift Container Platform 文档中的收集集群数据 所需的先决条件。 登录到您的集群。对于通常的用例,您应该在登录到您的 引擎 集群时运行
must-gather。备注:要检查您的受管集群,找到位于
cluster-scoped-resources目录中的gather-managed.log文件:<your-directory>/cluster-scoped-resources/gather-managed.log>
<your-directory>/cluster-scoped-resources/gather-managed.log>Copy to Clipboard Copied! Toggle word wrap Toggle overflow 检查 JOINED 和 AVAILABLE 栏没有被设置为
True的受管集群。您可以在这些没有以True状态连接的集群中运行must-gather命令。为用于收集数据和目录的 Kubernetes 镜像添加多集群引擎。运行以下命令,在其中提供您要插入的镜像和输出目录:
oc adm must-gather --image=registry.redhat.io/multicluster-engine/must-gather-rhel8:v2.2.0 --dest-dir=<directory>
oc adm must-gather --image=registry.redhat.io/multicluster-engine/must-gather-rhel8:v2.2.0 --dest-dir=<directory>Copy to Clipboard Copied! Toggle word wrap Toggle overflow 进入您指定的目录查看输出。输出以以下级别进行组织:
-
两个对等级别:
cluster-scoped-resources和namespace资源。 - 每个对等级别下的子类:用于 cluster-scope 和 namespace-scoped 资源的自定义资源定义的 API 组。
-
每个子类的下一级: 按
kind进行排序的 YAML 文件。
-
两个对等级别: