Skip to content

Commit 2d07267

Browse files
committed
docs: API docs for encryptionAtRest
1 parent 4cae899 commit 2d07267

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
+++
2+
title = "Encryption At REST"
3+
+++
4+
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`.
7+
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`.
10+
11+
We support following encryption providers
12+
13+
- aescbc
14+
- secretbox
15+
16+
More information about encryption at REST: [Encrypting Confidential Data at Rest
17+
](https://kubernetes.io/docs/tasks/administer-cluster/encrypt-data/)
18+
19+
## Example
20+
21+
To encrypt configmaps and secrets for using `aescbc` and `secretbox` encryption providers:
22+
23+
```yaml
24+
apiVersion: cluster.x-k8s.io/v1beta1
25+
kind: Cluster
26+
metadata:
27+
name: <NAME>
28+
spec:
29+
topology:
30+
variables:
31+
- name: clusterConfig
32+
value:
33+
encryptionAtRest:
34+
providers:
35+
- aescbc: {}
36+
- secretbox: {}
37+
```
38+
39+
Applying this configuration will result in
40+
41+
1. `<CLUSTER_NAME>-encryption-config` secret generated
42+
1. following value being set:
43+
44+
- `KubeadmControlPlaneTemplate`:
45+
46+
- ```yaml
47+
spec:
48+
kubeadmConfigSpec:
49+
clusterConfiguration:
50+
apiServer:
51+
extraArgs:
52+
encryption-provider-config: /etc/kubernetes/pki/encryptionconfig.yaml
53+
files:
54+
- contentFrom:
55+
secret:
56+
key: config
57+
name: my-cluster-encryption-config
58+
path: /etc/kubernetes/pki/encryptionconfig.yaml
59+
permissions: "0640"
60+
```

0 commit comments

Comments
 (0)