第 2 章 为 OpenShift 配置 Red Hat Single Sign-On


从安全的 Red Hat Registry: registry.redhat.io 中拉取(需要身份验证)的 Red Hat JBoss Middleware for OpenShift 镜像。要获得内容,您需要使用红帽帐户登录到 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. 创建 Service Account 后,点 Registry Service Accounts 页面中的 Account name 列中的 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
    2. 如果您正在运行基于 OpenShift Container Platform v4 的集群实例,使用 kubeadmin 户身份登录到 CLI

      $ oc login -u kubeadmin -p password https://openshift.example.com:6443
  3. 运行以下命令,为 openshift 项目中的 OpenShift 更新 Red Hat Single Sign-On 7.6.11 资源的核心集合。

    如果使用 OpenShift 3.x 集群,请使用以下命令:

    $ for resource in sso76-image-stream.json \
      passthrough/ocp-3.x/sso76-ocp3-https.json \
      passthrough/ocp-3.x/sso76-ocp3-postgresql.json \
      passthrough/ocp-3.x/sso76-ocp3-postgresql-persistent.json \
      reencrypt/ocp-3.x/sso76-ocp3-x509-https.json \
      reencrypt/ocp-3.x/sso76-ocp3-x509-postgresql-persistent.json
    do
      oc replace -n openshift --force -f \
      https://raw.githubusercontent.com/jboss-container-images/redhat-sso-7-openshift-image/sso76-dev/templates/${resource}
    done

    如果使用 OpenShift 4.x 集群,请使用下列命令:

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

    $ oc -n openshift import-image rh-sso-7/sso76-openshift-rhel8:7.6 --from=registry.redhat.io/rh-sso-7/sso76-openshift-rhel8:7.6 --confirm
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

Theme

© 2026 Red Hat
返回顶部