@@ -45,15 +45,24 @@ decrypt data stored in the etcd.
45
45
## Understanding the encryption at rest configuration
46
46
47
47
``` yaml
48
+ ---
49
+ #
50
+ # CAUTION: this is an example configuration.
51
+ # Do not use this for your own cluster!
52
+ #
48
53
apiVersion : apiserver.config.k8s.io/v1
49
54
kind : EncryptionConfiguration
50
55
resources :
51
56
- resources :
52
57
- secrets
53
58
- configmaps
54
- - pandas.awesome.bears.example
59
+ - pandas.awesome.bears.example # a custom resource API
55
60
providers :
56
- - identity : {}
61
+ # This configuration does not provide data confidentiality. The first
62
+ # configured provider is specifying the "identity" mechanism, which
63
+ # stores resources as plain text.
64
+ #
65
+ - identity : {} # plain text, in other words NO encryption
57
66
- aesgcm :
58
67
keys :
59
68
- name : key1
@@ -73,16 +82,16 @@ resources:
73
82
- resources :
74
83
- events
75
84
providers :
76
- - identity : {} # do not encrypt events even though *.* is specified below
85
+ - identity : {} # do not encrypt Events even though *.* is specified below
77
86
- resources :
78
- - ' *.apps'
87
+ - ' *.apps' # wildcard match requires Kubernetes 1.27 or later
79
88
providers :
80
89
- aescbc :
81
90
keys :
82
91
- name : key2
83
92
secret : c2VjcmV0IGlzIHNlY3VyZSwgb3IgaXMgaXQ/Cg==
84
93
- resources :
85
- - ' *.*'
94
+ - ' *.*' # wildcard match requires Kubernetes 1.27 or later
86
95
providers :
87
96
- aescbc :
88
97
keys :
@@ -272,6 +281,7 @@ retrieve the plaintext values, providing a higher level of security than locally
272
281
Create a new encryption config file :
273
282
274
283
` ` ` yaml
284
+ ---
275
285
apiVersion: apiserver.config.k8s.io/v1
276
286
kind: EncryptionConfiguration
277
287
resources:
@@ -283,8 +293,10 @@ resources:
283
293
- aescbc:
284
294
keys:
285
295
- name: key1
296
+ # See the following text for more details about the secret value
286
297
secret: <BASE 64 ENCODED SECRET>
287
- - identity: {}
298
+ - identity: {} # this fallback allows reading unencrypted secrets;
299
+ # for example, during initial migratoin
288
300
` ` `
289
301
290
302
To create a new Secret, perform the following steps :
@@ -305,14 +317,19 @@ To create a new Secret, perform the following steps:
305
317
1. Edit the manifest for the `kube-apiserver` static pod : ` /etc/kubernetes/manifests/kube-apiserver.yaml` similarly to this:
306
318
307
319
` ` ` yaml
320
+ ---
321
+ #
322
+ # This is a fragment of a manifest for a static Pod.
323
+ # Check whether this is correct for your cluster and for your API server.
324
+ #
308
325
apiVersion: v1
309
326
kind: Pod
310
327
metadata:
311
328
annotations:
312
- kubeadm.kubernetes.io/kube-apiserver.advertise-address.endpoint: 10.10 .30.4:6443
329
+ kubeadm.kubernetes.io/kube-apiserver.advertise-address.endpoint: 10.20 .30.40:443
313
330
creationTimestamp: null
314
331
labels:
315
- component: kube-apiserver
332
+ app.kubernetes.io/ component: kube-apiserver
316
333
tier: control-plane
317
334
name: kube-apiserver
318
335
namespace: kube-system
@@ -443,6 +460,7 @@ To disable encryption at rest, place the `identity` provider as the first entry
443
460
and restart all ` kube-apiserver ` processes.
444
461
445
462
``` yaml
463
+ ---
446
464
apiVersion : apiserver.config.k8s.io/v1
447
465
kind : EncryptionConfiguration
448
466
resources :
0 commit comments