From 047588fb31846b7216bee4ab74770a5801c6f3b1 Mon Sep 17 00:00:00 2001 From: KoukiNishihara Date: Tue, 14 Apr 2020 10:40:10 +0900 Subject: [PATCH 1/2] Fix indent of the example yaml :en --- .../tasks/administer-cluster/kms-provider.md | 90 +++++++++---------- 1 file changed, 44 insertions(+), 46 deletions(-) diff --git a/content/en/docs/tasks/administer-cluster/kms-provider.md b/content/en/docs/tasks/administer-cluster/kms-provider.md index 430312f8bc..53723afd0c 100644 --- a/content/en/docs/tasks/administer-cluster/kms-provider.md +++ b/content/en/docs/tasks/administer-cluster/kms-provider.md @@ -77,22 +77,22 @@ Ensure that the KMS plugin runs on the same host(s) as the Kubernetes master(s). ## Encrypting your data with the KMS provider To encrypt the data: -1. Create a new encryption configuration file using the appropriate properties for the `kms` provider: +1. Create a new encryption configuration file using the appropriate properties for the `kms` provider: -```yaml -apiVersion: apiserver.config.k8s.io/v1 -kind: EncryptionConfiguration -resources: - - resources: - - secrets - providers: - - kms: - name: myKmsPlugin - endpoint: unix:///tmp/socketfile.sock - cachesize: 100 - timeout: 3s - - identity: {} -``` + ```yaml + apiVersion: apiserver.config.k8s.io/v1 + kind: EncryptionConfiguration + resources: + - resources: + - secrets + providers: + - kms: + name: myKmsPlugin + endpoint: unix:///tmp/socketfile.sock + cachesize: 100 + timeout: 3s + - identity: {} + ``` 2. Set the `--encryption-provider-config` flag on the kube-apiserver to point to the location of the configuration file. 3. Restart your API server. @@ -135,22 +135,22 @@ To switch from a local encryption provider to the `kms` provider and re-encrypt 1. Add the `kms` provider as the first entry in the configuration file as shown in the following example. -```yaml -apiVersion: apiserver.config.k8s.io/v1 -kind: EncryptionConfiguration -resources: - - resources: - - secrets - providers: - - kms: - name : myKmsPlugin - endpoint: unix:///tmp/socketfile.sock - cachesize: 100 - - aescbc: - keys: - - name: key1 - secret: -``` + ```yaml + apiVersion: apiserver.config.k8s.io/v1 + kind: EncryptionConfiguration + resources: + - resources: + - secrets + providers: + - kms: + name : myKmsPlugin + endpoint: unix:///tmp/socketfile.sock + cachesize: 100 + - aescbc: + keys: + - name: key1 + secret: + ``` 2. Restart all kube-apiserver processes. @@ -165,24 +165,22 @@ To disable encryption at rest: 1. Place the `identity` provider as the first entry in the configuration file: -```yaml -apiVersion: apiserver.config.k8s.io/v1 -kind: EncryptionConfiguration -resources: - - resources: - - secrets - providers: - - identity: {} - - kms: - name : myKmsPlugin - endpoint: unix:///tmp/socketfile.sock - cachesize: 100 -``` + ```yaml + apiVersion: apiserver.config.k8s.io/v1 + kind: EncryptionConfiguration + resources: + - resources: + - secrets + providers: + - identity: {} + - kms: + name : myKmsPlugin + endpoint: unix:///tmp/socketfile.sock + cachesize: 100 + ``` 2. Restart all kube-apiserver processes. 3. Run the following command to force all secrets to be decrypted. ``` kubectl get secrets --all-namespaces -o json | kubectl replace -f - ``` {{% /capture %}} - - From 2648b9cf3194deab3b70789ccc31a7e76ea11a4c Mon Sep 17 00:00:00 2001 From: KoukiNishihara Date: Tue, 14 Apr 2020 10:51:41 +0900 Subject: [PATCH 2/2] remove extra space --- content/en/docs/tasks/administer-cluster/kms-provider.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/tasks/administer-cluster/kms-provider.md b/content/en/docs/tasks/administer-cluster/kms-provider.md index 53723afd0c..d90ca853cf 100644 --- a/content/en/docs/tasks/administer-cluster/kms-provider.md +++ b/content/en/docs/tasks/administer-cluster/kms-provider.md @@ -77,7 +77,7 @@ Ensure that the KMS plugin runs on the same host(s) as the Kubernetes master(s). ## Encrypting your data with the KMS provider To encrypt the data: -1. Create a new encryption configuration file using the appropriate properties for the `kms` provider: +1. Create a new encryption configuration file using the appropriate properties for the `kms` provider: ```yaml apiVersion: apiserver.config.k8s.io/v1