You are viewing documentation for a release that is no longer maintained. To view the documentation for the most recent version, see the latest RHACS docs.
11.3. 为现有实例配置端点
您可以为 Red Hat Advanced Cluster Security for Kubernetes 的现有实例配置端点。
流程
下载现有的配置映射:
$ oc -n stackrox get cm/central-endpoints -o go-template='{{index .data "endpoints.yaml"}}' > <directory_path>/central_endpoints.yaml
-
在下载的
central_endpoints.yaml
文件中,指定您的自定义 YAML 配置。 上传并应用修改后的
central_endpoints.yaml
配置文件:$ oc -n stackrox create cm central-endpoints --from-file=endpoints.yaml=<directory-path>/central-endpoints.yaml -o yaml --dry-run | \ oc label -f - --local -o yaml app.kubernetes.io/name=stackrox | \ oc apply -f -
- 重新启动 Central。
注意
如果您公开了默认端口 8443
以外的任何其他端口,您必须创建一个网络策略来允许这些额外端口上的流量。
11.3.1. 重启 Central 容器
您可以通过终止 Central 容器或删除 Central pod 重启 Central 容器。
流程
运行以下命令以终止 Central 容器:
注意您必须等待至少 1 分钟,直到 OpenShift Container Platform 传播您的更改并重启 Central 容器。
$ oc -n stackrox exec deploy/central -c central -- kill 1
或者,运行以下命令来删除 Central pod:
$ oc -n stackrox delete pod -lapp=central