第 2 章 Configuring Red Hat Single Sign-On for OpenShift


从安全 Red Hat Registry: registry.redhat.io 需要身份验证时,会按需拉取用于 OpenShift 镜像的 Red Hat JBoss Middleware。要检索内容,您需要使用红帽帐户登录 registry。

要在 OpenShift 等共享环境中使用 registry.redhat.io 中的容器镜像,建议管理员使用 Registry 服务帐户(也称为身份验证令牌)来代替个人的红帽客户门户网站凭证。

流程

  1. 要创建 Registry Service Account,请导航到 Registry Service Account Management Application,并在需要时登录。
  2. Registry Service Accounts 页面中,点 Create Service Account
  3. 为服务帐户提供名称,如 registry.redhat.io-sa。它将以固定、随机字符串开头。

    1. 为服务帐户输入描述,例如使用 registry.redhat.io 中的容器镜像
    2. Create
  4. 创建服务帐户后,点 Registry Service Accounts 页面中的" 帐户名称" 列中的 registry.redhat.io-sa 链接。
  5. 最后,单击 OpenShift Secret 选项卡,然后执行该页面中列出的所有步骤。

如需更多信息,请参阅 Red Hat Container Registry 身份验证 文章。

流程

  1. 确保您已作为集群管理员或具有全局 openshift 项目的项目管理员访问权限的用户身份登录:
  2. 根据您的 OpenShift Container Platform 版本选择命令。

    1. 如果您在 master 主机(一些)上运行基于 OpenShift Container Platform v3 的集群实例,请执行以下操作:

      $ oc login -u system:admin
      Copy to Clipboard Toggle word wrap
    2. 如果您正在运行基于 OpenShift Container Platform v4 的集群实例,以 kubeadmin 用户身份登录 CLI

      $ oc login -u kubeadmin -p password https://openshift.example.com:6443
      Copy to Clipboard Toggle word wrap
  3. 运行以下命令更新 openshift 项目中的 OpenShift 的 Red Hat Single Sign-On 7.5.3 资源集:

    $ for resource in sso75-image-stream.json \
      sso75-https.json \
      sso75-postgresql.json \
      sso75-postgresql-persistent.json \
      sso75-x509-https.json \
      sso75-x509-postgresql-persistent.json
    do
      oc replace -n openshift --force -f \
      https://raw.githubusercontent.com/jboss-container-images/redhat-sso-7-openshift-image/sso75-dev/templates/${resource}
    done
    Copy to Clipboard Toggle word wrap
  4. 运行以下命令,在 openshift 项目中安装 Red Hat Single Sign-On 7.5.3 OpenShift 镜像流:

    $ oc -n openshift import-image rh-sso-7/sso75-openshift-rhel8:7.5 --from=registry.redhat.io/rh-sso-7/sso75-openshift-rhel8:7.5 --confirm
    Copy to Clipboard Toggle word wrap
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

Theme

© 2026 Red Hat