This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.17.2. 配置防火墙
如果使用防火墙,您必须进行配置,以便 OpenShift Container Platform 能访问正常运作所需要的网站。您必须始终授予一些站点的访问权限,如果使用 Red Hat Insights、Telemetry 服务、托管集群的云以及某些构建策略,则还要授予更多站点的访问权限。
17.2.1. 为 OpenShift Container Platform 配置防火墙 复制链接链接已复制到粘贴板!
在安装 OpenShift Container Platform 之前,您必须配置防火墙,以授予 OpenShift Container Platform 所需站点的访问权限。
和在 worker 节点上运行的服务相比,运行在控制器节点中的服务没有特殊的配置注意事项。
流程
允许以下 registry URL:
Expand URL 端口 功能 registry.redhat.io443, 80
提供核心容器镜像
access.redhat.com443, 80
提供核心容器镜像
quay.io443, 80
提供核心容器镜像
cdn.quay.io443, 80
提供核心容器镜像
cdn01.quay.io443, 80
提供核心容器镜像
cdn02.quay.io443, 80
提供核心容器镜像
cdn03.quay.io443, 80
提供核心容器镜像
sso.redhat.com443, 80
https://console.redhat.com/openshift站点使用来自sso.redhat.com的身份验证您可以在 allowlist 中使用通配符
*.quay.io而不是cdn0[1-3].quay.io。在 allowlist 中添加站点(如quay.io)时,不要向 denylist 添加通配符条目,如*.quay.io。在大多数情况下,镜像 registry 使用内容交付网络(CDN)来提供镜像。如果防火墙阻止访问,当初始下载请求重定向到主机名(如cdn01.quay.io)时,镜像下载将被拒绝。- 将提供构建所需语言或框架的资源的任何站点列入允许列表。
如果不禁用 Telemetry,您必须授予对以下 URL 的访问权限,以便能访问 Red Hat Insights:
Expand URL 端口 功能 cert-api.access.redhat.com443, 80
Telemetry 所需
api.access.redhat.com443, 80
Telemetry 所需
infogw.api.openshift.com443, 80
Telemetry 所需
console.redhat.com/api/ingress,cloud.redhat.com/api/ingress443, 80
Telemetry 和
insights-operator需要如果使用 Amazon Web Services (AWS)、Microsoft Azure 或 Google Cloud Platform (GCP) 来托管您的集群,您必须授予对提供该云的云供应商 API 和 DNS 的 URL 的访问权限:
Expand 云 URL 端口 功能 AWS
*.amazonaws.com443, 80
需要此项以访问 AWS 服务和资源。请参阅 AWS 文档中 AWS Service Endpoints,以确定您使用的区域所允许的具体端点。
GCP
*.googleapis.com443, 80
需要此项以访问 GCP 服务和资源。请参阅 GCP 文档中的 Cloud Endpoints,以确定您的 API 所允许的端点。
accounts.google.com443, 80
需要此项以访问您的 GCP 帐户。
Azure
management.azure.com443, 80
需要此项以访问 Azure 服务和资源。请参阅 Azure 文档中的 Azure REST API 参考,以确定您的 API 所允许的端点。
*.blob.core.windows.net443, 80
需要此项以下载 Ignition 文件。
login.microsoftonline.com443, 80
需要此项以访问 Azure 服务和资源。请参阅 Azure 文档中的 Azure REST API 参考,以确定您的 API 所允许的端点。
将以下 URL 列入允许列表:
Expand URL 端口 功能 mirror.openshift.com443, 80
需要此项以访问镜像安装内容和镜像。此站点也是发行镜像签名的来源,但 Cluster Version Operator 只需要一个可正常工作的源。
storage.googleapis.com/openshift-release443, 80
发行版本镜像签名源,但 Cluster Version Operator 只需要一个可正常工作的源。
*.apps.<cluster_name>.<base_domain>443, 80
需要此项以访问默认的集群路由,除非您在安装过程中设置了入口通配符。
quayio-production-s3.s3.amazonaws.com443, 80
需要此项以访问 AWS 中的 Quay 镜像内容。
api.openshift.com443, 80
集群令牌需要,并检查集群是否有可用的更新。
rhcos-redirector.apps.art.xq1c.p1.openshiftapps.com,rhcos.mirror.openshift.com443, 80
需要此项以下载 Red Hat Enterprise Linux CoreOS(RHCOS)镜像。
console.redhat.com/openshift443, 80
集群令牌所需
registry.access.redhat.com443, 80
odoCLI 需要。sso.redhat.com443, 80
https://console.redhat.com/openshift站点使用来自sso.redhat.com的身份验证操作员需要路由访问权限来执行健康检查。特别是,身份验证和 Web 控制台 Operator 会连接到两个路由,以验证路由是否正常工作。如果您是集群管理员,且不想允许
*.apps.<cluster_name>.<base_domain>,请允许这些路由:-
oauth-openshift.apps.<cluster_name>.<base_domain> -
console-openshift-console.apps.<cluster_name>.<base_domain>,或者,在consoles.operator/cluster对象的spec.route.hostname字段中指定的主机名(如果此字段非空)。
-
将以下 URL 列入允许的可选第三方内容:
Expand URL 端口 功能 registry.connect.redhat.com443, 80
所有第三方镜像和认证操作器必填.
rhc4tp-prod-z8cxf-image-registry-us-east-1-evenkyleffocxqvofrk.s3.dualstack.us-east-1.amazonaws.com443, 80
提供对托管在
registry.connect.redhat.com上的容器镜像的访问oso-rhc4tp-docker-registry.s3-us-west-2.amazonaws.com443, 80
对于 Sonatype Nexus、F5 大 IP 操作器是必需的。
如果您使用默认的 Red Hat Network Time Protocol(NTP)服务器允许以下 URL:
-
1.rhel.pool.ntp.org -
2.rhel.pool.ntp.org -
3.rhel.pool.ntp.org
-
如果您没有使用默认的 Red Hat NTP 服务器,请验证您的平台的 NTP 服务器并在您的防火墙中允许它。