9.3. 为 OAuth 令牌创建 OpenShift Container Platform secret

在这一流程中,您将添加之前获取的访问令牌,以便与 Red Hat Quay 部署通信。访问令牌将存储在 OpenShift Container Platform 中,作为 secret。

先决条件

  • 您已设置 Red Hat Quay 并获取访问令牌。
  • 您已在 OpenShift Container Platform 上部署了 Quay Bridge Operator。
  • 具有集群管理员权限的 OpenShift Container Platform 4.6 或更高版本环境。
  • 已安装 OpenShift CLI(oc)。

流程

  • 创建在 openshift-operators 命名空间中包含访问令牌的 secret:

    $ oc create secret -n openshift-operators generic <secret-name> --from-literal=token=<access_token>