Skip to content

Commit 98973fd

Browse files
authored
Merge pull request #38137 from nilekhc/kms-docs
kms: updates website to document encryption config hot reload changes
2 parents 2df2cb5 + d132365 commit 98973fd

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

content/en/docs/tasks/administer-cluster/encrypt-data.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ This page shows how to enable and configure encryption of secret data at rest.
2626
The `kube-apiserver` process accepts an argument `--encryption-provider-config`
2727
that controls how API data is encrypted in etcd.
2828
The configuration is provided as an API named
29-
[`EncryptionConfiguration`](/docs/reference/config-api/apiserver-encryption.v1/).
30-
An example configuration is provided below.
29+
[`EncryptionConfiguration`](/docs/reference/config-api/apiserver-encryption.v1/). `--encryption-provider-config-automatic-reload` boolean argument determines if the file set by `--encryption-provider-config` should be automatically reloaded if the disk contents change. This enables key rotation without API server restarts. An example configuration is provided below.
3130

3231
{{< caution >}}
3332
**IMPORTANT:** For high-availability configurations (with two or more control plane nodes), the
@@ -323,4 +322,3 @@ kubectl get secrets --all-namespaces -o json | kubectl replace -f -
323322
## {{% heading "whatsnext" %}}
324323

325324
* Learn more about the [EncryptionConfiguration configuration API (v1)](/docs/reference/config-api/apiserver-encryption.v1/).
326-

content/en/docs/tasks/administer-cluster/kms-provider.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ defined in a CustomResourceDefinition, your cluster must be running Kubernetes v
153153

154154
1. Set the `--encryption-provider-config` flag on the kube-apiserver to point to the location of the configuration file.
155155

156+
1. `--encryption-provider-config-automatic-reload` boolean argument determines if the file set by `--encryption-provider-config` should be automatically reloaded if the disk contents change. This enables key rotation without API server restarts.
157+
156158
1. Restart your API server.
157159

158160
### KMS v1 {#encrypting-your-data-with-the-kms-provider-kms-v1}
@@ -202,6 +204,23 @@ defined in a CustomResourceDefinition, your cluster must be running Kubernetes v
202204
timeout: 3s
203205
```
204206
207+
Setting `--encryption-provider-config-automatic-reload` to `true` collapses all health checks to a single health check endpoint. Individual health checks are only available when KMS v1 providers are in use and the encryption config is not auto-reloaded.
208+
209+
Following table summarizes the health check endpoints for each KMS version:
210+
211+
| KMS configurations | Without Automatic Reload | With Automatic Reload |
212+
| ------------------------- |------------------------------------| -----------------------|
213+
| KMS v1 only | Individual Healthchecks | Single Healthcheck |
214+
| KMS v2 only | Single Healthcheck | Single Healthcheck |
215+
| Both KMS v1 and v2 | Individual Healthchecks | Single Healthcheck |
216+
| No KMS | None | Single Healthcheck |
217+
218+
`Single Healthcheck` means that the only health check endpoint is `/healthz/kms-providers`.
219+
220+
`Individual Healthchecks` means that each KMS plugin has an associated health check endpoint based on its location in the encryption config: `/healthz/kms-provider-0`, `/healthz/kms-provider-1` etc.
221+
222+
These healthcheck endpoint paths are hard coded and generated/controlled by the server. The indices for individual healthchecks corresponds to the order in which the KMS encryption config is processed.
223+
205224
Until the steps defined in [Ensuring all secrets are encrypted](#ensuring-all-secrets-are-encrypted) are performed, the `providers` list should end with the `identity: {}` provider to allow unencrypted data to be read. Once all resources are encrypted, the `identity` provider should be removed to prevent the API server from honoring unencrypted data.
206225

207226
For details about the `EncryptionConfiguration` format, please check the

0 commit comments

Comments
 (0)