第 5 章 启用离线模式


您可以通过启用离线模式,为没有连接到互联网的集群使用 Red Hat Advanced Cluster Security for Kubernetes。在离线模式下,Red Hat Advanced Cluster Security for Kubernetes 组件不会连接到互联网上的地址或主机。

注意

Red Hat Advanced Cluster Security for Kubernetes 不会决定用户提供的主机名、IP 地址或其他资源是否在互联网上。例如,如果您尝试与互联网上托管的 Docker registry 集成,Red Hat Advanced Cluster Security for Kubernetes 将不会阻止此请求。

以离线模式部署并运行 Red Hat Advanced Cluster Security for Kubernetes:

  1. 下载 RHACS 镜像并在集群中安装它们。如果使用 OpenShift Container Platform,您可以使用 Operator Lifecycle Manager (OLM) 和 OperatorHub 将镜像下载到连接到互联网的工作站中。然后,工作站将镜像推送到也连接到安全集群的镜像 registry 中。对于其他平台,您可以使用 Skopeo 或 Docker 等程序从远程 registry 中拉取镜像并将其推送到您自己的私有 registry,如 下载镜像以 离线使用 中所述。
  2. 在安装过程中启用离线模式。
  3. 通过上传每周一次的新定义文件来更新 Scanner 的漏洞列表。
重要

您只能在安装过程中启用离线模式,而不在升级过程中启用。

5.1. 下载镜像以离线使用

5.1.1. 镜像版本

您可以手动拉取、重新标记并推送 Red Hat Advanced Cluster Security for Kubernetes 镜像推送到 registry。当前版本包括以下镜像:

表 5.1. Red Hat Advanced Cluster Security for Kubernetes 镜像
Image描述当前版本

Main

包括 Central、Sensor、Admission 控制器和 Compliance 组件。还包括在持续集成(CI)系统中使用的 roxctl

registry.redhat.io/advanced-cluster-security/rhacs-main-rhel8:4.6.2

Central DB

为 Central 提供数据库存储的 PostgreSQL 实例。

registry.redhat.io/advanced-cluster-security/rhacs-central-db-rhel8:4.6.2

扫描程序

扫描镜像和节点。

  1. registry.redhat.io/advanced-cluster-security/rhacs-scanner-rhel8:4.6.2
  2. registry.redhat.io/advanced-cluster-security/rhacs-scanner-slim-rhel8:4.6.2

扫描程序数据库(Scanner DB)

存储镜像扫描结果和安全漏洞定义。

registry.redhat.io/advanced-cluster-security/rhacs-scanner-db-rhel8:4.6.2

scanner V4

扫描镜像。

registry.redhat.io/advanced-cluster-security/rhacs-scanner-v4-rhel8:4.6.2

Scanner V4 DB

存储 Scanner V4 的镜像扫描结果和漏洞定义。

registry.redhat.io/advanced-cluster-security/rhacs-scanner-v4-db-rhel8:4.6.2

Collector

收集 Kubernetes 或 OpenShift Container Platform 集群中的运行时活动。

  1. registry.redhat.io/advanced-cluster-security/rhacs-collector-rhel8:4.6.2
  2. registry.redhat.io/advanced-cluster-security/rhacs-collector-slim-rhel8:4.6.2

5.1.1.1. 重新标记镜像

您可以使用 Docker 命令行界面下载和重新标记镜像。

重要

在重新标记镜像时,您必须维护镜像名称和标签。例如,使用:

$ docker tag registry.redhat.io/advanced-cluster-security/rhacs-main-rhel8:4.6.2 <your_registry>/rhacs-main-rhel8:4.6.2

不要像以下示例一样重新标记:

$ docker tag registry.redhat.io/advanced-cluster-security/rhacs-main-rhel8:4.6.2 <your_registry>/other-name:latest

流程

  1. 登录到 registry:

    $ docker login registry.redhat.io
  2. 拉取镜像:

    $ docker pull <image>
  3. 重新标记镜像:

    $ docker tag <image> <new_image>
  4. 将更新的镜像推送到 registry:

    $ docker push <new_image>
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

© 2024 Red Hat, Inc.