3.11.2. 准备集群以收集支持数据

使用受限网络的集群必须导入默认的 must-gather 镜像,以便为红帽支持收集调试数据。在默认情况下,must-gather 镜像不会被导入,受限网络中的集群无法访问互联网来从远程存储库拉取最新的镜像。

流程

  1. 如果您还没有将镜像 registry 的可信 CA 添加到集群的镜像配置对象中,作为 Cluster Samples Operator 配置的一部分,请执行以下步骤:

    1. 创建集群的镜像配置对象:

      $ oc create configmap registry-config --from-file=${MIRROR_ADDR_HOSTNAME}..5000=$path/ca.crt -n openshift-config
    2. 在集群的镜像配置对象中,为镜像添加所需的可信 CA:

      $ oc patch image.config.openshift.io/cluster --patch '{"spec":{"additionalTrustedCA":{"name":"registry-config"}}}' --type=merge
  2. 从您的安装有效负载中导入默认 must-gather 镜像:

    $ oc import-image is/must-gather -n openshift

在运行 oc adm must-gather 命令时,请使用 --image 标志并指向有效负载镜像,如下例所示:

$ oc adm must-gather --image=$(oc adm release info --image-for must-gather)

其他资源