Skip to content

Commit eb7576b

Browse files
committed
docs: add detail about encryption keys
1 parent 75df09d commit eb7576b

File tree

2 files changed

+15
-34
lines changed

2 files changed

+15
-34
lines changed

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 0 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/content/customization/generic/encryption-at-rest.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ title = "Encryption At REST"
33
+++
44

55
`encryptionAtRest` variable enables encrypting kubernetes resources at REST using provided encryption provider.
6-
When this variable is set, kuberntetes secrets and configmaps are encrypted before writing them at `etcd`.
6+
When this variable is set, kuberntetes `secrets` and `configmap`s are encrypted before writing them at `etcd`.
77

88
If the `encryptionAtRest` property is not specified, then
9-
the customization will be skipped. The secrets and configmaps will not be stored as encrypted in `etcd`.
9+
the customization will be skipped. The `secrets` and `configmaps` will not be stored as encrypted in `etcd`.
1010

1111
We support following encryption providers
1212

@@ -18,7 +18,7 @@ More information about encryption at REST: [Encrypting Confidential Data at Rest
1818

1919
## Example
2020

21-
To encrypt configmaps and secrets for using `aescbc` and `secretbox` encryption providers:
21+
To encrypt `configmaps` and `secrets` kubernetes resources using `aescbc` encryption provider:
2222

2323
```yaml
2424
apiVersion: cluster.x-k8s.io/v1beta1
@@ -33,17 +33,23 @@ spec:
3333
encryptionAtRest:
3434
providers:
3535
- aescbc: {}
36-
- secretbox: {}
3736
```
3837
3938
Applying this configuration will result in
4039
41-
1. `<CLUSTER_NAME>-encryption-config` secret generated
42-
1. following value being set:
40+
1. `<CLUSTER_NAME>-encryption-config` secret generated.
41+
42+
A secret key for the encryption provider is generated and stored in `<CLUSTER_NAME>-encryption-config` secret.
43+
The APIServer will be configured to use the secret key to encrypt `secrets` and
44+
`configmaps` kubernetes resources before writing them to etcd.
45+
When reading resources from `etcd`, encryption provider that matches the stored data attempts in order to decrypt the data.
46+
We currently do not rotate the key once it generated.
47+
48+
1. Configure APIServer with encryption configuration:
4349

4450
- `KubeadmControlPlaneTemplate`:
4551

46-
- ```yaml
52+
```yaml
4753
spec:
4854
kubeadmConfigSpec:
4955
clusterConfiguration:
@@ -54,7 +60,7 @@ Applying this configuration will result in
5460
- contentFrom:
5561
secret:
5662
key: config
57-
name: my-cluster-encryption-config
63+
name: <CLUSTER_NAME>-encryption-config
5864
path: /etc/kubernetes/pki/encryptionconfig.yaml
5965
permissions: "0640"
60-
```
66+
```

0 commit comments

Comments
 (0)