@@ -3,10 +3,10 @@ title = "Encryption At REST"
3
3
+++
4
4
5
5
` 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 ` .
7
7
8
8
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 ` .
10
10
11
11
We support following encryption providers
12
12
@@ -18,7 +18,7 @@ More information about encryption at REST: [Encrypting Confidential Data at Rest
18
18
19
19
## Example
20
20
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 :
22
22
23
23
``` yaml
24
24
apiVersion : cluster.x-k8s.io/v1beta1
@@ -33,17 +33,23 @@ spec:
33
33
encryptionAtRest :
34
34
providers :
35
35
- aescbc : {}
36
- - secretbox : {}
37
36
` ` `
38
37
39
38
Applying this configuration will result in
40
39
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 :
43
49
44
50
- `KubeadmControlPlaneTemplate` :
45
51
46
- - ` ` ` yaml
52
+ ` ` ` yaml
47
53
spec:
48
54
kubeadmConfigSpec:
49
55
clusterConfiguration:
@@ -54,7 +60,7 @@ Applying this configuration will result in
54
60
- contentFrom:
55
61
secret:
56
62
key: config
57
- name: my-cluster -encryption-config
63
+ name: <CLUSTER_NAME> -encryption-config
58
64
path: /etc/kubernetes/pki/encryptionconfig.yaml
59
65
permissions: "0640"
60
- ` ` `
66
+ ` ` `
0 commit comments