--- title: kube-apiserver 加密配置 (v1) content_type: tool-reference package: apiserver.config.k8s.io/v1 auto_generated: true ---
包 v1 是 API 的 v1 版本。
## 资源类型 - [EncryptionConfiguration](#apiserver-config-k8s-io-v1-EncryptionConfiguration) ## `EncryptionConfiguration` {#apiserver-config-k8s-io-v1-EncryptionConfiguration} ' to encrypt all resources within a group or '.' to encrypt all resources. '.' can be used to encrypt all resource in the core group. '.' will encrypt all resources, even custom resources that are added after API server start. Use of wildcards that overlap within the same resource list or across multiple entries are not allowed since part of the configuration would be ineffective. Resource lists are processed in order, with earlier lists taking precedence. -->
EncryptionConfiguration 为加密驱动保存完整的配置信息。
它还允许使用通配符指定应加密的资源。
使用 *.<group> 加密组内的所有资源,或使用 *.* 加密所有资源。
*. 可用于加密核心组内的所有资源。
*.* 将加密所有资源,甚至是 API 服务器启动后添加的自定义资源。
不允许在同一资源列表内或跨多个条目中使用重叠的通配符,因为部分配置将无效。
按顺序处理资源列表,列在前面的被优先处理。
例如:
kind: EncryptionConfiguration
apiVersion: apiserver.config.k8s.io/v1
resources:
- resources:
- events
providers:
- identity: {} # do not encrypt events even though *.* is specified below
- resources:
- secrets
- configmaps
- pandas.awesome.bears.example
providers:
- aescbc:
keys:
- name: key1
secret: c2VjcmV0IGlzIHNlY3VyZQ==
- resources:
- '*.apps'
providers:
- aescbc:
keys:
- name: key2
secret: c2VjcmV0IGlzIHNlY3VyZSwgb3IgaXMgaXQ/Cg==
- resources:
- '*.*'
providers:
- aescbc:
keys:
- name: key3
secret: c2VjcmV0IGlzIHNlY3VyZSwgSSB0aGluaw==
| 字段 | 描述 |
|---|---|
apiVersionstring | apiserver.config.k8s.io/v1 |
kindstring | EncryptionConfiguration |
resources [必需][]ResourceConfiguration
|
|
AESConfiguration 包含 AES 转换器的 API 配置信息。
| 字段 | 描述 |
|---|---|
keys [必需][]Key
|
|
IdentityConfiguration 是一个空的结构,用来支持在驱动配置中支持标识转换器。
## `KMSConfiguration` {#apiserver-config-k8s-io-v1-KMSConfiguration} **出现在:** - [ProviderConfiguration](#apiserver-config-k8s-io-v1-ProviderConfiguration)KMSConfiguration 包含基于 KMS 的封套转换器的名称、缓存大小以及配置文件路径信息。
| 字段 | 描述 |
|---|---|
apiVersionstring
|
KeyManagementService 的 apiVersion |
name [必需]string
|
|
cachesizeint32
|
|
endpoint [必需]string
|
|
timeoutmeta/v1.Duration
|
对 KMS 插件执行 gRPC 调用的超时时长(例如,'5s')。默认值为 3 秒。 |
Key 中包含为某转换器所提供的键名和对应的私密数据。
| 字段 | 描述 |
|---|---|
name [必需]string
|
|
secret [必需]string
|
|
ProviderConfiguration 为加密驱动存储配置信息。
| 字段 | 描述 |
|---|---|
aesgcm [必需]AESConfiguration
|
|
aescbc [必需]AESConfiguration
|
|
secretbox [必需]SecretboxConfiguration
|
|
identity [必需]IdentityConfiguration
|
|
kms [必需]KMSConfiguration
|
|
ResourceConfiguration 中保存资源配置。
| 字段 | 描述 |
|---|---|
resources [必需][]string
|
|
providers [必需][]ProviderConfiguration
|
|
SecretboxConfiguration 包含用于某 Secretbox 转换器的 API 配置。
| 字段 | 描述 |
|---|---|
keys [必需][]Key
|
|