@@ -79,20 +79,20 @@ To encrypt the data:
79
79
80
80
1 . Create a new encryption configuration file using the appropriate properties for the ` kms ` provider:
81
81
82
- ``` yaml
83
- apiVersion : apiserver.config.k8s.io/v1
84
- kind : EncryptionConfiguration
85
- resources :
86
- - resources :
87
- - secrets
88
- providers :
89
- - kms :
90
- name : myKmsPlugin
91
- endpoint : unix:///tmp/socketfile.sock
92
- cachesize : 100
93
- timeout : 3s
94
- - identity : {}
95
- ` ` `
82
+ ``` yaml
83
+ apiVersion : apiserver.config.k8s.io/v1
84
+ kind : EncryptionConfiguration
85
+ resources :
86
+ - resources :
87
+ - secrets
88
+ providers :
89
+ - kms :
90
+ name : myKmsPlugin
91
+ endpoint : unix:///tmp/socketfile.sock
92
+ cachesize : 100
93
+ timeout : 3s
94
+ - identity : {}
95
+ ` ` `
96
96
97
97
2. Set the ` --encryption-provider-config` flag on the kube-apiserver to point to the location of the configuration file.
98
98
3. Restart your API server.
@@ -135,22 +135,22 @@ To switch from a local encryption provider to the `kms` provider and re-encrypt
135
135
136
136
1. Add the `kms` provider as the first entry in the configuration file as shown in the following example.
137
137
138
- ```yaml
139
- apiVersion: apiserver.config.k8s.io/v1
140
- kind: EncryptionConfiguration
141
- resources:
142
- - resources:
143
- - secrets
144
- providers:
145
- - kms:
146
- name : myKmsPlugin
147
- endpoint: unix:///tmp/socketfile.sock
148
- cachesize: 100
149
- - aescbc:
150
- keys:
151
- - name: key1
152
- secret: <BASE 64 ENCODED SECRET>
153
- ```
138
+ ```yaml
139
+ apiVersion: apiserver.config.k8s.io/v1
140
+ kind: EncryptionConfiguration
141
+ resources:
142
+ - resources:
143
+ - secrets
144
+ providers:
145
+ - kms:
146
+ name : myKmsPlugin
147
+ endpoint: unix:///tmp/socketfile.sock
148
+ cachesize: 100
149
+ - aescbc:
150
+ keys:
151
+ - name: key1
152
+ secret: <BASE 64 ENCODED SECRET>
153
+ ```
154
154
155
155
2 . Restart all kube-apiserver processes.
156
156
@@ -165,24 +165,22 @@ To disable encryption at rest:
165
165
166
166
1 . Place the ` identity ` provider as the first entry in the configuration file:
167
167
168
- ``` yaml
169
- apiVersion : apiserver.config.k8s.io/v1
170
- kind : EncryptionConfiguration
171
- resources :
172
- - resources :
173
- - secrets
174
- providers :
175
- - identity : {}
176
- - kms :
177
- name : myKmsPlugin
178
- endpoint : unix:///tmp/socketfile.sock
179
- cachesize : 100
180
- ` ` `
168
+ ``` yaml
169
+ apiVersion : apiserver.config.k8s.io/v1
170
+ kind : EncryptionConfiguration
171
+ resources :
172
+ - resources :
173
+ - secrets
174
+ providers :
175
+ - identity : {}
176
+ - kms :
177
+ name : myKmsPlugin
178
+ endpoint : unix:///tmp/socketfile.sock
179
+ cachesize : 100
180
+ ` ` `
181
181
2. Restart all kube-apiserver processes.
182
182
3. Run the following command to force all secrets to be decrypted.
183
183
` ` `
184
184
kubectl get secrets --all-namespaces -o json | kubectl replace -f -
185
185
```
186
186
{{% /capture %}}
187
-
188
-
0 commit comments