×

在安全集群中部署 Red Hat Advanced Cluster Security for Kubernetes (RHACS) 服务。(Deploy Red Hat Advanced Cluster Security for Kubernetes (RHACS) services in secured clusters.)

用法 (Usage)
$ roxctl sensor [command] [flags]
表 1. 可用命令 (Table 1. Available commands)
命令 (Command) 描述 (Description)

generate

生成文件以在安全集群中部署 RHACS 服务。(Generate files to deploy RHACS services in secured clusters.)

generate-certs

下载包含传感器、收集器和准入控制器的更新证书的 YAML 文件。(Download a YAML file with renewed certificates for Sensor, Collector, and Admission controller.)

get-bundle

下载包含在集群中部署 RHACS 服务的文件的捆绑包。(Download a bundle with the files to deploy RHACS services in a cluster.)

表 2. 选项 (Table 2. Options)
选项 (Option) 描述 (Description)

--retry-timeout duration

设置 API 请求重试之前的超时时间。值为零表示等待整个请求持续时间而无需重试。默认值为 `20s`。(Set the timeout after which API requests are retried. A value of zero means that the entire request duration is waited for without retrying. The default value is `20s`.)

-t, --timeout duration

设置 API 请求的超时时间,表示请求的最大持续时间。默认值为 `1m0s`。(Set the timeout for API requests representing the maximum duration of a request. The default value is `1m0s`.)

roxctl sensor 命令选项继承自父命令 (roxctl sensor command options inherited from the parent command)

roxctl sensor 命令支持从父 roxctl 命令继承的以下选项 (The roxctl sensor command supports the following options inherited from the parent roxctl command)

选项 (Option) 描述 (Description)

--ca string

指定用于安全连接的自定义 CA 证书文件路径。或者,您可以使用 `ROX_CA_CERT_FILE` 环境变量指定文件路径。(Specify a custom CA certificate file path for secure connections. Alternatively, you can specify the file path by using the `ROX_CA_CERT_FILE` environment variable.)

--direct-grpc

设置--direct-grpc以提高连接性能。或者,通过将ROX_DIRECT_GRPC_CLIENT环境变量设置为true,可以启用直接gRPC连接。默认值为false

-e, --endpoint string

设置要联系的服务的端点。或者,您可以使用ROX_ENDPOINT环境变量来设置端点。默认值为localhost:8443

--force-http1

强制所有连接使用HTTP/1。或者,通过将ROX_CLIENT_FORCE_HTTP1环境变量设置为true,可以强制使用HTTP/1。默认值为false

--insecure

启用不安全连接选项。或者,通过将ROX_INSECURE_CLIENT环境变量设置为true,可以启用不安全连接选项。默认值为false

--insecure-skip-tls-verify

跳过TLS证书验证。或者,通过将ROX_INSECURE_CLIENT_SKIP_TLS_VERIFY环境变量设置为true,可以跳过TLS证书验证。默认值为false

--no-color

禁用彩色输出。或者,通过将ROX_NO_COLOR环境变量设置为true,可以禁用彩色输出。默认值为false

-p, --password string

指定基本身份验证的密码。或者,您可以使用ROX_ADMIN_PASSWORD环境变量来设置密码。

--plaintext

使用未加密的连接。或者,通过将ROX_PLAINTEXT环境变量设置为true,可以启用未加密的连接。默认值为false

-s, --server-name string

设置用于SNI的TLS服务器名称。或者,您可以使用ROX_SERVER_NAME环境变量来设置服务器名称。

--token-file string

使用指定文件中提供的API令牌进行身份验证。或者,您可以使用ROX_API_TOKEN环境变量来设置令牌。

这些选项适用于roxctl sensor命令的所有子命令。

roxctl sensor generate

生成文件以在安全集群中部署 RHACS 服务。(Generate files to deploy RHACS services in secured clusters.)

用法 (Usage)
$ roxctl sensor generate [flags]
表3. 选项
选项 (Option) 描述 (Description)

--admission-controller-disable-bypass

禁用准入控制器的旁路注释。默认值为false

--admission-controller-enforce-on-creates

准入控制器中动态启用对对象创建的强制执行。默认值为false

--admission-controller-enforce-on-updates

启用准入控制器中对对象更新的动态强制执行。默认值为false

--admission-controller-listen-on-creates

配置准入控制器webhook以侦听部署创建。默认值为false

--admission-controller-listen-on-updates

配置准入控制器webhook以侦听部署更新。默认值为false

--admission-controller-scan-inline

使用准入控制器时,内联获取扫描结果。默认值为false

--admission-controller-timeout int32

设置准入控制器的超时时间(秒)。默认值为3

--central string

设置要连接Sensor的端点。默认值为central.stackrox:443

--collection-method collection method

指定要用于运行时支持的收集方法。收集方法包括nonedefaultebpfcore_bpf。默认值为default

--collector-image-repository string

设置要用于部署Collector的镜像仓库。如果未指定,则会派生与有效的--main-image仓库值相对应的默认值。

--continue-if-exists

即使集群已存在,也要继续下载传感器包。默认值为false

--create-upgrader-sa

决定是否创建具有cluster-admin权限的升级器服务帐户,以方便自动传感器升级。默认值为true

--disable-tolerations

禁用受污染节点的容忍度。默认值为false

--enable-pod-security-policies

创建PodSecurityPolicy资源。默认值为true

--istio-support string

生成支持指定Istio版本的部署文件。有效版本包括1.01.11.21.31.41.51.61.7

--main-image-repository string

指定要用于部署Sensor的镜像仓库。如果未指定,则使用默认值。

--name string

设置集群名称以标识集群。

--output-dir string

设置包内容的输出目录。默认值为当前目录内自动生成的目录名称。

--slim-collector string[="true"]

在部署包中使用Collector-slim。有效值包括autotruefalse。默认值为auto

-t, --timeout duration

设置API请求的超时时间,表示请求的最大持续时间。默认值为5m0s

roxctl sensor generate k8s

生成在Kubernetes集群中部署RHACS服务所需的文件。

用法 (Usage)
$ roxctl sensor generate k8s [flags]
表4. 选项
选项 (Option) 描述 (Description)

--admission-controller-listen-on-events

启用准入控制器webhook以侦听Kubernetes事件。默认值为true

roxctl sensor generate openshift

生成在Red Hat OpenShift集群中部署RHACS服务所需的文件。

用法 (Usage)
$ roxctl sensor generate openshift [flags]
表5. 选项
选项 (Option) 描述 (Description)

`--admission-controller-listen-on-events false

true

auto[=true]`

启用或禁用准入控制器webhook以侦听Kubernetes事件。默认值为auto

`--disable-audit-logs false

true

auto[=true]`

启用或禁用运行时检测的审计日志收集。默认值为auto

--openshift-version int

指定要为其生成部署文件的Red Hat OpenShift主版本。

roxctl sensor get-bundle

下载包含将RHACS服务部署到集群中的文件包。

用法 (Usage)
$ roxctl sensor get-bundle <cluster_details> [flags] (1)
1 对于<cluster_details>,请指定集群名称或ID。
表6. 选项
选项 (Option) 描述 (Description)

--create-upgrader-sa

指定是否创建具有cluster-admin权限的升级器服务帐户以进行自动Sensor升级。默认值为true

--istio-support string

生成支持指定Istio版本的部署文件。有效版本包括1.01.11.21.31.41.51.61.7

--output-dir string

指定包内容的输出目录。默认值为当前目录内自动生成的目录名称。

--slim-collector string[="true"]

在部署包中使用Collector-slim。有效值包括autotruefalse。默认值为auto

-t, --timeout duration

设置API请求的超时时间,表示请求的最大持续时间。默认值为5m0s

roxctl sensor generate-certs

下载包含传感器、收集器和准入控制器的更新证书的 YAML 文件。(Download a YAML file with renewed certificates for Sensor, Collector, and Admission controller.)

用法 (Usage)
$ roxctl sensor generate-certs <cluster_details> [flags] (1)
1 对于<cluster_details>,请指定集群名称或ID。
表7. 选项
选项 (Option) 描述 (Description)

--output-dir string

指定YAML文件的输出目录。默认值为.