4.9. ETCD 加密策略
应用 etcd-encryption
策略,在 ETCD 数据存储中检测或启用敏感数据的加密。Kubernetes 配置策略控制器负责监控 etcd-encryption
策略的状态。如需更多信息,请参阅 OpenShift Container Platform 文档中的 加密 etcd 数据。注 :ETCD 加密策略只支持 Red Hat OpenShift Container Platform 4 及更新的版本。
在以下部分了解更多有关 etcd-encryption
策略结构的详细信息:
4.9.1. ETCD 加密策略 YAML 结构
etcd-encryption
策略可能类似以下 YAML 文件:
apiVersion: policy.open-cluster-management.io/v1 kind: Policy metadata: name: namespace: annotations: policy.open-cluster-management.io/standards: policy.open-cluster-management.io/categories: policy.open-cluster-management.io/controls: policy.open-cluster-management.io/description: spec: remediationAction: disabled: policy-templates: - objectDefinition: apiVersion: policy.open-cluster-management.io/v1 kind: ConfigurationPolicy metadata: name: spec: remediationAction: severity: object-templates: - complianceType: objectDefinition: apiVersion: config.openshift.io/v1 kind: APIServer metadata: name: spec: encryption: ...
4.9.2. ETCD 加密策略表
字段 | 可选或必需的 | 描述 |
---|---|---|
| 必填 |
将值设置为 |
| 必填 |
将值设为 |
| 必填 | 用于标识策略资源的名称。 |
| 必填 | 策略的命名空间。 |
| 选填 |
指定您的策略的修复。参数值是 |
| 必填 |
将值设为 |
| 必填 | 用于列出包含必须接受评估或应用到受管集群的 Kubernetes 对象的配置策略。 |
4.9.3. ETCD 加密策略示例
如需策略示例,请参阅 policy-etcdencryption.yaml
。请参阅 Hub 集群策略框架 文档和 Kubernetes 配置策略控制器,以查看策略和配置策略字段的更多详情。