Skip to content

Commit ec54f98

Browse files
authored
Merge pull request #20303 from Nishikoh/fix-indent
Fix indent of the example yaml
2 parents 566dbd3 + 2648b9c commit ec54f98

File tree

1 file changed

+43
-45
lines changed

1 file changed

+43
-45
lines changed

content/en/docs/tasks/administer-cluster/kms-provider.md

Lines changed: 43 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -79,20 +79,20 @@ To encrypt the data:
7979

8080
1. Create a new encryption configuration file using the appropriate properties for the `kms` provider:
8181

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+
```
9696
9797
2. Set the `--encryption-provider-config` flag on the kube-apiserver to point to the location of the configuration file.
9898
3. Restart your API server.
@@ -135,22 +135,22 @@ To switch from a local encryption provider to the `kms` provider and re-encrypt
135135
136136
1. Add the `kms` provider as the first entry in the configuration file as shown in the following example.
137137
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+
```
154154

155155
2. Restart all kube-apiserver processes.
156156

@@ -165,24 +165,22 @@ To disable encryption at rest:
165165

166166
1. Place the `identity` provider as the first entry in the configuration file:
167167

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+
```
181181
2. Restart all kube-apiserver processes.
182182
3. Run the following command to force all secrets to be decrypted.
183183
```
184184
kubectl get secrets --all-namespaces -o json | kubectl replace -f -
185185
```
186186
{{% /capture %}}
187-
188-

0 commit comments

Comments
 (0)