2017-06-27 19:41:39 +00:00
---
2022-02-10 03:27:52 +00:00
title: Encrypting Secret Data at Rest
2018-02-18 19:29:37 +00:00
reviewers:
2017-06-27 19:41:39 +00:00
- smarterclayton
2022-11-30 03:18:55 +00:00
- enj
2020-05-30 19:10:23 +00:00
content_type: task
2020-02-06 21:03:25 +00:00
min-kubernetes-server-version: 1.13
2023-01-11 16:12:34 +00:00
weight: 210
2017-06-27 19:41:39 +00:00
---
2020-05-30 19:10:23 +00:00
<!-- overview -->
2017-06-27 19:41:39 +00:00
This page shows how to enable and configure encryption of secret data at rest.
2020-05-30 19:10:23 +00:00
## {{% heading "prerequisites" %}}
2018-05-05 16:00:51 +00:00
* {{< include " task-tutorial-prereqs . md " > }} {{< version-check > }}
2017-06-27 19:41:39 +00:00
2020-02-06 21:03:25 +00:00
* etcd v3.0 or later is required
2017-09-22 16:27:19 +00:00
2022-11-30 03:18:55 +00:00
* To encrypt a custom resource, your cluster must be running Kubernetes v1.26 or newer.
2020-05-30 19:10:23 +00:00
<!-- steps -->
2017-06-27 19:41:39 +00:00
## Configuration and determining whether encryption at rest is already enabled
Official 1.13 Release Docs (#11401)
* Update metadata.generation behaviour for custom resources (#10705)
* update docs promoting plugins to beta (#10796)
* docs update to promote TaintBasedEvictions to beta (#10765)
* First Korean l10n work for dev-1.13 (#10719)
* Update outdated l10n(ko) contents (#10689)
fixes #10686
* Translate concepts/overview/what-is-kubernetes in Korean (#10690)
* Translate concepts/overview/what-is-kubernetes in Korean
* Feedback from ClaudiaJKang
* Translate concepts/overview/components in Korean (#10882)
* Translate concepts/overview/components in Korean #10717
* Translate concepts/overview/components in Korean
* Translate concepts/overview/components in Korean
* Apply Korean glossary: 서비스 어카운트
* Translate concepts/overview/kubernetes-api in Korean (#10773)
* Translate concepts/overview/kubernetes-api in Korean
* Applied feedback from ianychoi
* kubeadm: update the configuration docs to v1beta1 (#10959)
* kubeadm: add small v1beta1 related updates (#10988)
* ADD content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md (#11031)
* ADD content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md
* ADD content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init.md
* Update content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md
Accepted
Co-Authored-By: YouthLab <tsui@highyouth.com>
* do not change 'master' or 'worker' nodes to '主从'
* Doc updates for volume scheduling GA (#10743)
* Doc updates for volume scheduling GA
* Make trivial change to kick build
* Document nodelease feature (#10699)
* advanced audit doc for ModeBlockingStrict (#10203)
* Rename EncryptionConfig to EncryptionConfiguration (#11080)
EncryptionConfig was renamed to EncryptedConfiguration and added to
the `apiserver.config.k8s.io` API group in Kubernetes 1.13.
The feature was previously in alpha and was not handling versions
properly, which lead to an originally unnoticed `v1` in the docs.
* content/zh/docs/reference/setup-tools/kubeadm/kubeadm-init.md
* trsanlate create-cluster-kubeadm.md to chinese (#11041)
* trsanlate create-cluster-kubeadm.md to chinese
* Update create-cluster-kubeadm.md
* update the feature stage in v1.13 (#11307)
* update new feature gates to document (#11295)
* refresh controller role list on rbac description page (#11290)
* node labeling restriction docs (#10944)
* Update 1.13 docs for CSI GA (#10893)
* dynamic audit documentation (#9947)
* adds dynamic audit documentation
* Copyedit for clarity
See also inline question/s
* Fix feature state shortcode
* Update feature state
* changes wording for dynamic audit flag behavior
* Minor copyedit
* fix dynamic audit yaml
* adds api enablement command to dynamic audit docs
* change ordering dynamic audit appears in
* add references to dynamic audit in webhook backend
* reword dynamic audit reference
* updates stages field for audit sink object
* changes audit sink api definition; rewords policy
* kubeadm: remove kube-proxy workaround (#11162)
* zh-trans content/en/docs/setup/independent/install-kubeadm.md (#11338)
* zh-trans content/en/docs/setup/independent/install-kubeadm.md
* Update install-kubeadm.md
* Update dry run feature to beta (#11140)
* vSphere volume raw block support doc update (#10932)
* Add docs for Windows DNS configurations (#10036)
* Update docs for fields allowed at root of CRD schema (#9973)
* Add docs for Windows DNS configurations
* add device monitoring documentation (#9945)
* kubeadm: adds upgrade instructions for 1.13 (#11138)
* kubeadm: adds upgrade instructions for 1.13
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* add minor copyedits
Addressed a couple of copyedit comments a bit more cleanly.
* kubeadm: add improvements to HA docs (#11094)
* kubeadm: add information and diagrams for HA topologies
* kubeadm: update HA doc with simplified steps
* kubeadm: update HA doc with simplified steps
* edit ha, add new topology topic, reorder by weight
* troubleshoot markdown
* fix more markdown, fix links
* more markdown
* more markdown
* more markdown
* changes after reviewer comments
* add steps about Weave
* update note about stacked topology
* kubeadm external etcd HA upgrade 1.13 (#11364)
* kubeadm external etcd HA upgrade 1.13
Signed-off-by: Ruben Orduz <rubenoz@gmail.com>
* Update stacked controlplane steps
* kubeadm cert documentation (#11093)
* kubeadm certificate API and CSR documentation
* copyedits
* fix typo
* PR for diff docs (#10789)
* Empty commit against dev-1.13 for diff documentation
* Complete Declarative maangement with diff commands
* Second Korean l10n work for dev-1.13. (#11030)
* Update outdated l10n(ko) contents (#10915)
* Translate main menu for l10n(ko) docs (#10916)
* Translate tasks/run-application/horizontal-pod-autoscale-walkthrough (#10980)
* Translate content/ko/docs/concepts/overview/working-with-objects/kubernetes-object in Korean #11104 (#11332)
* Pick-right-solution page translates into Korean. (#11340)
* ko-trans: add jd/..., sap/..., ebay/..., homeoffice/... (#11336)
* Translate concept/workloads/pods/pod-overview.md (#11092)
Co-authored-by: June Yi <june.yi@samsung.com>
Co-authored-by: Jesang Myung <jesang.myung@gmail.com>
Co-authored-by: zerobig <38598117+zer0big@users.noreply.github.com>
Co-authored-by: Claudia J.Kang <claudiajkang@gmail.com>
Co-authored-by: lIuDuI <1693291525@qq.com>
Co-authored-by: Woojin Na(Eddie) <cheapluv@gmail.com>
* Rename encryption-at-rest related objects (#11059)
EncryptionConfig was renamed to EncryptedConfiguration and added to
the `apiserver.config.k8s.io` API group in Kubernetes 1.13.
The feature was previously in alpha and was not handling versions
properly, which lead to an originally unnoticed `v1` in the docs.
Also, the `--experimental-encryption-provider-config` flag is now called
just `--encryption-provider-config`.
* Documenting FlexVolume Resize alpha feature. (#10097)
* CR webhook conversion documentation (#10986)
* CR Conversion
* Addressing comments
* Addressing more comments
* Addressing even more comments
* Addressing even^2 more comments
* Remove references to etcd2 in v1.13 since support has been removed (#11414)
* Remove etcd2 references as etcd2 is deprecated
Link back to the v1.12 version of the etcd3 doc for
the etcd2->etcd3 migration instructions.
I updated the kube-apiserver reference manually,
unsure if that is auto-generated somehow.
The federation-apiserver can still potentially
support etcd2 so I didn't touch that.
* Remove outdated {master,node}.yaml files
There are master/node yaml files that reference
etcd2.service that are likely highly out of date.
I couldn't find any docs that actually reference
these templates so I removed them
* Address review comments
* Final Korean l10n work for dev-1.13 (#11440)
* Update outdated l10n(ko) contents (#11425)
fixes #11424
* Remove references to etcd2 in content/ko (#11416)
* Resolve conflicts against master for /ko contents (#11438)
* Fix unopened caution shortcode
* kubeadm: update the reference docs for 1.13 (#10960)
* docs update to promote TaintBasedEvictions to beta (#10765)
* First Korean l10n work for dev-1.13 (#10719)
* Update outdated l10n(ko) contents (#10689)
fixes #10686
* Translate concepts/overview/what-is-kubernetes in Korean (#10690)
* Translate concepts/overview/what-is-kubernetes in Korean
* Feedback from ClaudiaJKang
* Translate concepts/overview/components in Korean (#10882)
* Translate concepts/overview/components in Korean #10717
* Translate concepts/overview/components in Korean
* Translate concepts/overview/components in Korean
* Apply Korean glossary: 서비스 어카운트
* Translate concepts/overview/kubernetes-api in Korean (#10773)
* Translate concepts/overview/kubernetes-api in Korean
* Applied feedback from ianychoi
* kubeadm: update the configuration docs to v1beta1 (#10959)
* kubeadm: add small v1beta1 related updates (#10988)
* update new feature gates to document (#11295)
* Update dry run feature to beta (#11140)
* kubeadm: add improvements to HA docs (#11094)
* kubeadm: add information and diagrams for HA topologies
* kubeadm: update HA doc with simplified steps
* kubeadm: update HA doc with simplified steps
* edit ha, add new topology topic, reorder by weight
* troubleshoot markdown
* fix more markdown, fix links
* more markdown
* more markdown
* more markdown
* changes after reviewer comments
* add steps about Weave
* update note about stacked topology
* kubeadm: update reference docs
- add section about working with phases under kubeadm-init.md
- update GA / beta status of features
- kubeadm alpha phase was moved to kubeadm init phase
- new commands were added under kubeadm alpha
- included new CoreDNS usage examples
* Generate components and tools reference
* Add generated federation API Reference (#11491)
* Add generated federation API Reference
* Add front matter to federation reference
* Remove whitespace from federation front matter
* Remove more whitespace from federation front matter
* Remove superfluous kubefed reference
* Add frontmatter to generated kubefed reference
* Fix kubefed reference page frontmatter
* Generate kubectl reference docs 1.13 (#11487)
* Generate kubectl reference docs 1.13
* Fix links in kubectl reference
* Add 1.13 API reference (#11489)
* Update config.toml (#11486)
* Update config.toml
Preparing for 1.13 release, updating the config.toml and dropping the 1.8 docs reference.
* update dot releases and docsbranch typo
* adding .Site. to Params.currentUrl (#11503)
see https://github.com/kubernetes/website/pull/11502 for context
* Add 1.13 Release notes (#11499)
2018-12-04 01:21:11 +00:00
The `kube-apiserver` process accepts an argument `--encryption-provider-config`
2022-02-10 03:27:52 +00:00
that controls how API data is encrypted in etcd.
The configuration is provided as an API named
2022-11-28 20:03:57 +00:00
[`EncryptionConfiguration` ](/docs/reference/config-api/apiserver-encryption.v1/ ). `--encryption-provider-config-automatic-reload` boolean argument determines if the file set by `--encryption-provider-config` should be automatically reloaded if the disk contents change. This enables key rotation without API server restarts. An example configuration is provided below.
2017-06-27 19:41:39 +00:00
2022-01-18 10:40:37 +00:00
{{< caution > }}
2022-02-10 03:27:52 +00:00
**IMPORTANT:** For high-availability configurations (with two or more control plane nodes), the
encryption configuration file must be the same! Otherwise, the `kube-apiserver` component cannot
decrypt data stored in the etcd.
2022-01-18 10:40:37 +00:00
{{< / caution > }}
2022-12-18 13:48:07 +00:00
## Understanding the encryption at rest configuration
2017-06-27 19:41:39 +00:00
```yaml
Official 1.13 Release Docs (#11401)
* Update metadata.generation behaviour for custom resources (#10705)
* update docs promoting plugins to beta (#10796)
* docs update to promote TaintBasedEvictions to beta (#10765)
* First Korean l10n work for dev-1.13 (#10719)
* Update outdated l10n(ko) contents (#10689)
fixes #10686
* Translate concepts/overview/what-is-kubernetes in Korean (#10690)
* Translate concepts/overview/what-is-kubernetes in Korean
* Feedback from ClaudiaJKang
* Translate concepts/overview/components in Korean (#10882)
* Translate concepts/overview/components in Korean #10717
* Translate concepts/overview/components in Korean
* Translate concepts/overview/components in Korean
* Apply Korean glossary: 서비스 어카운트
* Translate concepts/overview/kubernetes-api in Korean (#10773)
* Translate concepts/overview/kubernetes-api in Korean
* Applied feedback from ianychoi
* kubeadm: update the configuration docs to v1beta1 (#10959)
* kubeadm: add small v1beta1 related updates (#10988)
* ADD content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md (#11031)
* ADD content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md
* ADD content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init.md
* Update content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md
Accepted
Co-Authored-By: YouthLab <tsui@highyouth.com>
* do not change 'master' or 'worker' nodes to '主从'
* Doc updates for volume scheduling GA (#10743)
* Doc updates for volume scheduling GA
* Make trivial change to kick build
* Document nodelease feature (#10699)
* advanced audit doc for ModeBlockingStrict (#10203)
* Rename EncryptionConfig to EncryptionConfiguration (#11080)
EncryptionConfig was renamed to EncryptedConfiguration and added to
the `apiserver.config.k8s.io` API group in Kubernetes 1.13.
The feature was previously in alpha and was not handling versions
properly, which lead to an originally unnoticed `v1` in the docs.
* content/zh/docs/reference/setup-tools/kubeadm/kubeadm-init.md
* trsanlate create-cluster-kubeadm.md to chinese (#11041)
* trsanlate create-cluster-kubeadm.md to chinese
* Update create-cluster-kubeadm.md
* update the feature stage in v1.13 (#11307)
* update new feature gates to document (#11295)
* refresh controller role list on rbac description page (#11290)
* node labeling restriction docs (#10944)
* Update 1.13 docs for CSI GA (#10893)
* dynamic audit documentation (#9947)
* adds dynamic audit documentation
* Copyedit for clarity
See also inline question/s
* Fix feature state shortcode
* Update feature state
* changes wording for dynamic audit flag behavior
* Minor copyedit
* fix dynamic audit yaml
* adds api enablement command to dynamic audit docs
* change ordering dynamic audit appears in
* add references to dynamic audit in webhook backend
* reword dynamic audit reference
* updates stages field for audit sink object
* changes audit sink api definition; rewords policy
* kubeadm: remove kube-proxy workaround (#11162)
* zh-trans content/en/docs/setup/independent/install-kubeadm.md (#11338)
* zh-trans content/en/docs/setup/independent/install-kubeadm.md
* Update install-kubeadm.md
* Update dry run feature to beta (#11140)
* vSphere volume raw block support doc update (#10932)
* Add docs for Windows DNS configurations (#10036)
* Update docs for fields allowed at root of CRD schema (#9973)
* Add docs for Windows DNS configurations
* add device monitoring documentation (#9945)
* kubeadm: adds upgrade instructions for 1.13 (#11138)
* kubeadm: adds upgrade instructions for 1.13
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* add minor copyedits
Addressed a couple of copyedit comments a bit more cleanly.
* kubeadm: add improvements to HA docs (#11094)
* kubeadm: add information and diagrams for HA topologies
* kubeadm: update HA doc with simplified steps
* kubeadm: update HA doc with simplified steps
* edit ha, add new topology topic, reorder by weight
* troubleshoot markdown
* fix more markdown, fix links
* more markdown
* more markdown
* more markdown
* changes after reviewer comments
* add steps about Weave
* update note about stacked topology
* kubeadm external etcd HA upgrade 1.13 (#11364)
* kubeadm external etcd HA upgrade 1.13
Signed-off-by: Ruben Orduz <rubenoz@gmail.com>
* Update stacked controlplane steps
* kubeadm cert documentation (#11093)
* kubeadm certificate API and CSR documentation
* copyedits
* fix typo
* PR for diff docs (#10789)
* Empty commit against dev-1.13 for diff documentation
* Complete Declarative maangement with diff commands
* Second Korean l10n work for dev-1.13. (#11030)
* Update outdated l10n(ko) contents (#10915)
* Translate main menu for l10n(ko) docs (#10916)
* Translate tasks/run-application/horizontal-pod-autoscale-walkthrough (#10980)
* Translate content/ko/docs/concepts/overview/working-with-objects/kubernetes-object in Korean #11104 (#11332)
* Pick-right-solution page translates into Korean. (#11340)
* ko-trans: add jd/..., sap/..., ebay/..., homeoffice/... (#11336)
* Translate concept/workloads/pods/pod-overview.md (#11092)
Co-authored-by: June Yi <june.yi@samsung.com>
Co-authored-by: Jesang Myung <jesang.myung@gmail.com>
Co-authored-by: zerobig <38598117+zer0big@users.noreply.github.com>
Co-authored-by: Claudia J.Kang <claudiajkang@gmail.com>
Co-authored-by: lIuDuI <1693291525@qq.com>
Co-authored-by: Woojin Na(Eddie) <cheapluv@gmail.com>
* Rename encryption-at-rest related objects (#11059)
EncryptionConfig was renamed to EncryptedConfiguration and added to
the `apiserver.config.k8s.io` API group in Kubernetes 1.13.
The feature was previously in alpha and was not handling versions
properly, which lead to an originally unnoticed `v1` in the docs.
Also, the `--experimental-encryption-provider-config` flag is now called
just `--encryption-provider-config`.
* Documenting FlexVolume Resize alpha feature. (#10097)
* CR webhook conversion documentation (#10986)
* CR Conversion
* Addressing comments
* Addressing more comments
* Addressing even more comments
* Addressing even^2 more comments
* Remove references to etcd2 in v1.13 since support has been removed (#11414)
* Remove etcd2 references as etcd2 is deprecated
Link back to the v1.12 version of the etcd3 doc for
the etcd2->etcd3 migration instructions.
I updated the kube-apiserver reference manually,
unsure if that is auto-generated somehow.
The federation-apiserver can still potentially
support etcd2 so I didn't touch that.
* Remove outdated {master,node}.yaml files
There are master/node yaml files that reference
etcd2.service that are likely highly out of date.
I couldn't find any docs that actually reference
these templates so I removed them
* Address review comments
* Final Korean l10n work for dev-1.13 (#11440)
* Update outdated l10n(ko) contents (#11425)
fixes #11424
* Remove references to etcd2 in content/ko (#11416)
* Resolve conflicts against master for /ko contents (#11438)
* Fix unopened caution shortcode
* kubeadm: update the reference docs for 1.13 (#10960)
* docs update to promote TaintBasedEvictions to beta (#10765)
* First Korean l10n work for dev-1.13 (#10719)
* Update outdated l10n(ko) contents (#10689)
fixes #10686
* Translate concepts/overview/what-is-kubernetes in Korean (#10690)
* Translate concepts/overview/what-is-kubernetes in Korean
* Feedback from ClaudiaJKang
* Translate concepts/overview/components in Korean (#10882)
* Translate concepts/overview/components in Korean #10717
* Translate concepts/overview/components in Korean
* Translate concepts/overview/components in Korean
* Apply Korean glossary: 서비스 어카운트
* Translate concepts/overview/kubernetes-api in Korean (#10773)
* Translate concepts/overview/kubernetes-api in Korean
* Applied feedback from ianychoi
* kubeadm: update the configuration docs to v1beta1 (#10959)
* kubeadm: add small v1beta1 related updates (#10988)
* update new feature gates to document (#11295)
* Update dry run feature to beta (#11140)
* kubeadm: add improvements to HA docs (#11094)
* kubeadm: add information and diagrams for HA topologies
* kubeadm: update HA doc with simplified steps
* kubeadm: update HA doc with simplified steps
* edit ha, add new topology topic, reorder by weight
* troubleshoot markdown
* fix more markdown, fix links
* more markdown
* more markdown
* more markdown
* changes after reviewer comments
* add steps about Weave
* update note about stacked topology
* kubeadm: update reference docs
- add section about working with phases under kubeadm-init.md
- update GA / beta status of features
- kubeadm alpha phase was moved to kubeadm init phase
- new commands were added under kubeadm alpha
- included new CoreDNS usage examples
* Generate components and tools reference
* Add generated federation API Reference (#11491)
* Add generated federation API Reference
* Add front matter to federation reference
* Remove whitespace from federation front matter
* Remove more whitespace from federation front matter
* Remove superfluous kubefed reference
* Add frontmatter to generated kubefed reference
* Fix kubefed reference page frontmatter
* Generate kubectl reference docs 1.13 (#11487)
* Generate kubectl reference docs 1.13
* Fix links in kubectl reference
* Add 1.13 API reference (#11489)
* Update config.toml (#11486)
* Update config.toml
Preparing for 1.13 release, updating the config.toml and dropping the 1.8 docs reference.
* update dot releases and docsbranch typo
* adding .Site. to Params.currentUrl (#11503)
see https://github.com/kubernetes/website/pull/11502 for context
* Add 1.13 Release notes (#11499)
2018-12-04 01:21:11 +00:00
apiVersion: apiserver.config.k8s.io/v1
2019-05-09 05:44:47 +00:00
kind: EncryptionConfiguration
2017-06-27 19:41:39 +00:00
resources:
- resources:
2022-02-10 03:27:52 +00:00
- secrets
2022-11-30 03:18:55 +00:00
- configmaps
- pandas.awesome.bears.example
2017-06-27 19:41:39 +00:00
providers:
2022-02-10 03:27:52 +00:00
- identity: {}
- aesgcm:
keys:
- name: key1
secret: c2VjcmV0IGlzIHNlY3VyZQ==
- name: key2
secret: dGhpcyBpcyBwYXNzd29yZA==
- aescbc:
keys:
- name: key1
secret: c2VjcmV0IGlzIHNlY3VyZQ==
- name: key2
secret: dGhpcyBpcyBwYXNzd29yZA==
- secretbox:
keys:
- name: key1
secret: YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoxMjM0NTY=
2017-06-27 19:41:39 +00:00
```
Each `resources` array item is a separate config and contains a complete configuration. The
2022-11-30 03:18:55 +00:00
`resources.resources` field is an array of Kubernetes resource names (`resource` or `resource.group`
that should be encrypted like Secrets, ConfigMaps, or other resources.
If custom resources are added to `EncryptionConfiguration` and the cluster version is 1.26 or newer,
any newly created custom resources mentioned in the `EncryptionConfiguration` will be encrypted.
Any custom resources that existed in etcd prior to that version and configuration will be unencrypted
until they are next written to storage. This is the same behavior as built-in resources.
See the [Ensure all secrets are encrypted ](#ensure-all-secrets-are-encrypted ) section.
The `providers` array is an ordered list of the possible encryption providers to use for the APIs that you listed.
2017-06-27 19:41:39 +00:00
2022-02-10 03:27:52 +00:00
Only one provider type may be specified per entry (`identity` or `aescbc` may be provided,
but not both in the same item).
The first provider in the list is used to encrypt resources written into the storage. When reading
resources from storage, each provider that matches the stored data attempts in order to decrypt the
data. If no provider can read the stored data due to a mismatch in format or secret key, an error
2020-05-12 18:35:56 +00:00
is returned which prevents clients from accessing that resource.
2017-06-27 19:41:39 +00:00
2022-02-10 03:27:52 +00:00
For more detailed information about the `EncryptionConfiguration` struct, please refer to the
[encryption configuration API ](/docs/reference/config-api/apiserver-encryption.v1/ ).
2018-11-06 19:33:04 +00:00
{{< caution > }}
2022-02-10 03:27:52 +00:00
If any resource is not readable via the encryption config (because keys were changed),
2020-05-12 18:35:56 +00:00
the only recourse is to delete that key from the underlying etcd directly. Calls that attempt to
2017-06-27 19:41:39 +00:00
read that resource will fail until it is deleted or a valid decryption key is provided.
2018-11-06 19:33:04 +00:00
{{< / caution > }}
2017-06-27 19:41:39 +00:00
2022-12-18 13:48:07 +00:00
### Providers
2017-06-27 19:41:39 +00:00
2020-02-06 21:03:25 +00:00
{{< table caption = "Providers for Kubernetes encryption at rest" > }}
2017-06-27 19:41:39 +00:00
Name | Encryption | Strength | Speed | Key Length | Other Considerations
-----|------------|----------|-------|------------|---------------------
`identity` | None | N/A | N/A | N/A | Resources written as-is without encryption. When set as the first provider, the resource will be decrypted as new values are written.
2020-02-06 21:03:25 +00:00
`secretbox` | XSalsa20 and Poly1305 | Strong | Faster | 32-byte | A newer standard and may not be considered acceptable in environments that require high levels of review.
Merge 1.10 to master for release (#7861)
* 1.10 update (#7151)
* Fix partition value expected behaviour explanation (#7123)
Fixes issue #7057
* Correct "On-Premise" to "On-Premises"
* Updates the Calico installation page (#7094)
* All files for Haufe Groups case study (#7051)
* Fix typo (#7127)
* fix typo of device-plugins.md (#7106)
* fix broken links (#7136)
* Updated configure-service-account (#7147)
Error from server resolved by escaping kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "myregistrykey"}]}' JSON string by '\'
* Remove docs related to 'require-kubeconfig' (#7138)
With kubernetes/kubernetes#58367 merged, v1.10 will not use the
"require-kubeconfig" flag. The flag has become a no-op solely to ensure
existing deployments won't break.
* Added Verification Scenario for a Pod that Uses a PVC in Terminating State (#7164)
The below PR:
https://github.com/kubernetes/kubernetes/pull/55873
modified scheduler in such a way that scheduling of a pod that uses a PVC in Terminating state fails.
That's why verification of such scenario was added to documentation.
* fix LimitPodHardAntiAffinityTopology name (#7221)
* Document the removal of the KubeletConfigFile feature gate (#7140)
With kubernetes/kubernetes#58978 merged, the said feature gate is
removed. This PR removes texts related to the gate and revises the
Feature Gates reference to reflect this change.
* deprecate three admission controller (#7363)
* Document the removal of Accelerators feature gate (#7389)
The `Accelerators` feature gate will be removed in 1.11. 1.10 will be
its last mile.
References: kubernetes/kubernetes#57384
* Update local storage docs for beta (#7473)
* Document that HugePages feature gate is Beta (#7387)
The `HugePages` feature gate has graduated to Beta in v1.10. This PR
documents this fact.
* Add HyperVContainer feature gates (#7502)
* Remove the beta reference from Taints and Tolerations doc (#7493)
* Kms provider doc (#7479)
* Kms provider doc
* issue# 7399, Create KMS-provider.md and update encrypt-data.md
* address review comments
* Document that Device Plugin feature is Beta (1.10) (#7512)
* Add docs for CRD features for 1.10 (#7439)
* Add docs for CRD features for 1.10
* Add CustomResourcesSubresources to list of feature gates
* Add latest changes to custom resources doc
* Add crds as abbreviated alias (#7437)
* Bring PVC Protection Feature to Beta (#7165)
* Bring PVC Protection Feature to Beta
The PR: https://github.com/kubernetes/kubernetes/pull/59052
brought PVC Protection feature to beta.
That's why the documentation is updated accordingly.
* The PVC Protection feature was renamed to Storage Protection. That's why the documentation is updated.
* promote PodNodeSelector to stable; document detailed behavior (#7134)
* promote PodNodeSelector to stable; document detailed behavior
* respond to feedback
* Update CPU manager feature enabling (#7390)
With `CPUManager` feature graduating to beta. No explicit enabling is
required starting v1.10.
References: kubernetes/kubernetes#55977
* Adding block volumeMode documentation for local volumes. (#7531)
Code review comments.
Changed property to field.
Address tech review comment.
* remove description kubectl --show-all (#7574)
--show-all has been deprecated and set to true by default.
https://github.com/kubernetes/kubernetes/pull/60210
* fix description about contribute style guide (#7592)
* fix description about KUBECONFIG (#7589)
s/envrionment/environment
* fix description about cni (#7588)
s/simultanously/simultaneously/
* fix description about MutatingAdmissionWebhook and ValidatingAdmissionWebhook (#7587)
* fix description about persistent volume binding (#7590)
s/slighty/slightly/
* Doc change for configurable pod resolv.conf Beta (#7611)
* fix description about out of resource handling (#7597)
s/threshhold/threshold
* fix description about zookeeper (#7598)
s/achive/achieve
* fix description about kubeadm (#7594)
s/compatability/compatibility/
* fix description about kubeadm (#7593)
* fix description about kubeadm implementation details (#7595)
* fix description about api concepts (#7596)
* Storage Protection was renamed to Storage Object in Use Protection (#7576)
* Storage Protection was renamed to Storage Object in Use Protection
The K8s PR: https://github.com/kubernetes/kubernetes/pull/59901
renamed Storage Protection to Storage Object in Use Protection.
That's why the same is also renamed in the documentation.
* Moved Storage Object in Use Protection admission plugin description down according to alphabetic order.
* Use PSP from policy API group. (#7562)
* update kubeletconfig docs for v1.10, beta (#7561)
* Update port-forwarding docs (#7575)
* add pv protection description (#7620)
* fix description about client library (#7634)
* Add docs on configuring NodePort IP (#7631)
* Document that LocalStorageCapacityIsolation is beta (#7635)
A follow-up to the kubernetes/kubernetes#60159 change which has promoted
the `LocalStorageCapacityIsolation` feature gate to Beta.
* Update CoreDNS docs for beta (#7638)
* Update CoreDNS docs for beta
* Review comments
* Fix typo (#7640)
* Update feature gates move to beta (#7662)
* Added the inability to use colon ':' character as environment variable names and described workaround (#7657)
* merge master to 1.10, with fixes (#7682)
* Flag names changed (s/admission-control/enable-admission-plugins); disable-admissions-plugin entry added; removed reference to admission controller/plugins requiring set order (for v1.10), redundant example enabling specific plugin, and redundant version-specific info (#7449)
* Documentation for MountPropagation beta (#7655)
* Remove job's scale-related operations (#7684)
* authentication: document client-go exec plugins (#7648)
* authentication: document client-go exec plugins
* Update authentication.md
* Update local ephemeral storage feature to beta (#7685)
Update local ephemeral storage feature to beta
* Update docs for windows container resources (#7653)
* add server-side print docs (#7671)
* Create a task describing Pod process namespace sharing (#7489)
* Add external metrics to HPA docs (#7664)
* Add external metrics to HPA docs
* Update horizontal-pod-autoscale-walkthrough.md
* Apply review comments to HPA walkthrough
* remove description about "scale jobs" (#7712)
* CSI Docs for K8s v1.10 (#7698)
* Add a warning about increased memory consumption for audit logging feature. (#7725)
Signed-off-by: Mik Vyatskov <vmik@google.com>
* Update Audit Logging documentation for 1.10 (#7679)
Signed-off-by: Mik Vyatskov <vmik@google.com>
* Fix stage names in audit logging documentation (#7746)
Signed-off-by: Mik Vyatskov <vmik@google.com>
* Feature gate update for release 1.10 (#7742)
* State in the docs that the value of default Node labels are not reliable. (#7794)
* Kill the reference to --admission-control option (#7755)
The `--admission-control` option has been replaced by two new options in
v1.10. This PR kills the last appearance of the old option in the doc.
* Pvcprotection toc (#7807)
* Refreshing installation instructions (#7495)
* Refreshing installation instructions
Added conjure-up. Updated displays and juju versions to current versions.
* Updated anchors
* Fixed image value version typo (#7768)
Was inconsistent with other values
* Update flocker reference to the github repo (#7784)
* Fix typo in federation document (#7779)
* an user -> a user (#7778)
* Events are namespaced (#7767)
* fix 'monitoring' link lose efficacy problem' (#7764)
* docs/concepts/policy/pod-security-policy.md: minor fix. (#7659)
* Update downward-api-volume-expose-pod-information.md (#7771)
* Update downward-api-volume-expose-pod-information.md
The pod spec puts the downward api files into /etc/podinfo, not directly in /etc. Updated docs to reflect this fact.
* Update downward-api-volume-expose-pod-information.md
One more spot needed fixing.
* Update downward-api-volume-expose-pod-information.md
Yet another fix, in the container example.
* Add Amadeus Case Study (#7783)
* Add Amadeus Case Study
* add Amadeus logo
* Fixed Cyrillic с in 'kube-proxy-cm' (#7787)
There was a typo (wrong character) in kube-proxy-cm.yaml - Cyrillic с (UTF-8 0x0441) was used instead of Latin c.
* install-kubectl: choose one installation method (#7705)
The previous text layout suggested that all installations had to be done, one after another.
* Update install-kubeadm.md (#7781)
Add note to kubeadm install instruction to help install in other arch i.e. aarch64, ppc64le etc.
* repair failure link (#7788)
* repair failure link
* repair failure link
* do change as required
* Update k8s201.md (#7777)
* Update k8s201.md
Change instructions to download yams files directly from the website (as used in other pages.)
Added instructions to delete labeled pod to avoid warnings in the subsequent deployment step.
* Update k8s201.md
Added example of using the exposed host from the a node running Kubernetes. (This works on AWS with Weave; not able to test it on other variations...)
* Gramatical fix to kompose introduction (#7792)
The original wording didn't through very well. As much of the original sentence has been preserved as possible, primarily to ensure the kompose web address is see both in text and as a href link.
* update amadeus.html (#7800)
* Fix a missing word in endpoint reconciler section (#7804)
* add toc entry for pvcprotection downgrade issue doc
* Pvcprotection toc (#7809)
* Refreshing installation instructions (#7495)
* Refreshing installation instructions
Added conjure-up. Updated displays and juju versions to current versions.
* Updated anchors
* Fixed image value version typo (#7768)
Was inconsistent with other values
* Update flocker reference to the github repo (#7784)
* Fix typo in federation document (#7779)
* an user -> a user (#7778)
* Events are namespaced (#7767)
* fix 'monitoring' link lose efficacy problem' (#7764)
* docs/concepts/policy/pod-security-policy.md: minor fix. (#7659)
* Update downward-api-volume-expose-pod-information.md (#7771)
* Update downward-api-volume-expose-pod-information.md
The pod spec puts the downward api files into /etc/podinfo, not directly in /etc. Updated docs to reflect this fact.
* Update downward-api-volume-expose-pod-information.md
One more spot needed fixing.
* Update downward-api-volume-expose-pod-information.md
Yet another fix, in the container example.
* Add Amadeus Case Study (#7783)
* Add Amadeus Case Study
* add Amadeus logo
* Fixed Cyrillic с in 'kube-proxy-cm' (#7787)
There was a typo (wrong character) in kube-proxy-cm.yaml - Cyrillic с (UTF-8 0x0441) was used instead of Latin c.
* install-kubectl: choose one installation method (#7705)
The previous text layout suggested that all installations had to be done, one after another.
* Update install-kubeadm.md (#7781)
Add note to kubeadm install instruction to help install in other arch i.e. aarch64, ppc64le etc.
* repair failure link (#7788)
* repair failure link
* repair failure link
* do change as required
* Update k8s201.md (#7777)
* Update k8s201.md
Change instructions to download yams files directly from the website (as used in other pages.)
Added instructions to delete labeled pod to avoid warnings in the subsequent deployment step.
* Update k8s201.md
Added example of using the exposed host from the a node running Kubernetes. (This works on AWS with Weave; not able to test it on other variations...)
* Gramatical fix to kompose introduction (#7792)
The original wording didn't through very well. As much of the original sentence has been preserved as possible, primarily to ensure the kompose web address is see both in text and as a href link.
* update amadeus.html (#7800)
* Fix a missing word in endpoint reconciler section (#7804)
* add toc entry for pvcprotection downgrade issue doc
* revert TOC change
* Release 1.10 (#7818)
* Refreshing installation instructions (#7495)
* Refreshing installation instructions
Added conjure-up. Updated displays and juju versions to current versions.
* Updated anchors
* Fixed image value version typo (#7768)
Was inconsistent with other values
* Update flocker reference to the github repo (#7784)
* Fix typo in federation document (#7779)
* an user -> a user (#7778)
* Events are namespaced (#7767)
* fix 'monitoring' link lose efficacy problem' (#7764)
* docs/concepts/policy/pod-security-policy.md: minor fix. (#7659)
* Update downward-api-volume-expose-pod-information.md (#7771)
* Update downward-api-volume-expose-pod-information.md
The pod spec puts the downward api files into /etc/podinfo, not directly in /etc. Updated docs to reflect this fact.
* Update downward-api-volume-expose-pod-information.md
One more spot needed fixing.
* Update downward-api-volume-expose-pod-information.md
Yet another fix, in the container example.
* Add Amadeus Case Study (#7783)
* Add Amadeus Case Study
* add Amadeus logo
* Fixed Cyrillic с in 'kube-proxy-cm' (#7787)
There was a typo (wrong character) in kube-proxy-cm.yaml - Cyrillic с (UTF-8 0x0441) was used instead of Latin c.
* install-kubectl: choose one installation method (#7705)
The previous text layout suggested that all installations had to be done, one after another.
* Update install-kubeadm.md (#7781)
Add note to kubeadm install instruction to help install in other arch i.e. aarch64, ppc64le etc.
* repair failure link (#7788)
* repair failure link
* repair failure link
* do change as required
* Update k8s201.md (#7777)
* Update k8s201.md
Change instructions to download yams files directly from the website (as used in other pages.)
Added instructions to delete labeled pod to avoid warnings in the subsequent deployment step.
* Update k8s201.md
Added example of using the exposed host from the a node running Kubernetes. (This works on AWS with Weave; not able to test it on other variations...)
* Gramatical fix to kompose introduction (#7792)
The original wording didn't through very well. As much of the original sentence has been preserved as possible, primarily to ensure the kompose web address is see both in text and as a href link.
* update amadeus.html (#7800)
* Fix a missing word in endpoint reconciler section (#7804)
* Partners page updates (#7802)
* Partners page updates
* Update to ZTE link
* Make using sysctls a task instead of a concept (#6808)
Closes: #4505
* add a note when mount a configmap to pod (#7745)
* adjust a note format (#7812)
* Update docker-cli-to-kubectl.md (#7748)
* Update docker-cli-to-kubectl.md
Edited the document for adherence to the style guide and word usage.
* Update docker-cli-to-kubectl.md
* Incorporated the changes suggested.
* Mount propagation update to include docker config (#7854)
* update overridden config for 1.10 (#7847)
* update overridden config for 1.10
* fix config file per comments
* Update Extended Resource doc wrt cluster-level resources (#7759)
2018-03-27 01:33:11 +00:00
`aesgcm` | AES-GCM with random nonce | Must be rotated every 200k writes | Fastest | 16, 24, or 32-byte | Is not recommended for use except when an automated key rotation scheme is implemented.
2022-05-30 10:51:13 +00:00
`aescbc` | AES-CBC with [PKCS#7 ](https://datatracker.ietf.org/doc/html/rfc2315 ) padding | Weak | Fast | 32-byte | Not recommended due to CBC's vulnerability to padding oracle attacks.
2022-12-18 13:48:07 +00:00
`kms` | Uses envelope encryption scheme: Data is encrypted by data encryption keys (DEKs) using AES-CBC with [PKCS#7 ](https://datatracker.ietf.org/doc/html/rfc2315 ) padding (prior to v1.25), using AES-GCM starting from v1.25, DEKs are encrypted by key encryption keys (KEKs) according to configuration in Key Management Service (KMS) | Strongest | Fast | 32-bytes | The recommended choice for using a third party tool for key management. Simplifies key rotation, with a new DEK generated for each encryption, and KEK rotation controlled by the user. [Configure the KMS provider ](/docs/tasks/administer-cluster/kms-provider/ ).
2017-06-27 19:41:39 +00:00
Each provider supports multiple keys - the keys are tried in order for decryption, and if the provider
2017-06-28 23:37:32 +00:00
is the first provider, the first key is used for encryption.
2017-06-27 19:41:39 +00:00
2020-02-06 21:03:25 +00:00
2022-02-10 03:27:52 +00:00
{{< caution > }}
Storing the raw encryption key in the EncryptionConfig only moderately improves your security
posture, compared to no encryption. Please use `kms` provider for additional security.
{{< / caution > }}
2022-11-30 03:18:55 +00:00
By default, the `identity` provider is used to protect secret data in etcd, which provides no
encryption. `EncryptionConfiguration` was introduced to encrypt secret data locally, with a locally
2022-02-10 03:27:52 +00:00
managed key.
2020-02-06 21:03:25 +00:00
2022-11-30 03:18:55 +00:00
Encrypting secret data with a locally managed key protects against an etcd compromise, but it fails to
2022-02-10 03:27:52 +00:00
protect against a host compromise. Since the encryption keys are stored on the host in the
EncryptionConfiguration YAML file, a skilled attacker can access that file and extract the encryption
keys.
Envelope encryption creates dependence on a separate key, not stored in Kubernetes. In this case,
an attacker would need to compromise etcd, the `kubeapi-server` , and the third-party KMS provider to
retrieve the plaintext values, providing a higher level of security than locally stored encryption keys.
2019-06-11 02:30:16 +00:00
2017-06-27 19:41:39 +00:00
## Encrypting your data
2017-08-16 07:10:25 +00:00
Create a new encryption config file:
2017-06-27 19:41:39 +00:00
```yaml
Official 1.13 Release Docs (#11401)
* Update metadata.generation behaviour for custom resources (#10705)
* update docs promoting plugins to beta (#10796)
* docs update to promote TaintBasedEvictions to beta (#10765)
* First Korean l10n work for dev-1.13 (#10719)
* Update outdated l10n(ko) contents (#10689)
fixes #10686
* Translate concepts/overview/what-is-kubernetes in Korean (#10690)
* Translate concepts/overview/what-is-kubernetes in Korean
* Feedback from ClaudiaJKang
* Translate concepts/overview/components in Korean (#10882)
* Translate concepts/overview/components in Korean #10717
* Translate concepts/overview/components in Korean
* Translate concepts/overview/components in Korean
* Apply Korean glossary: 서비스 어카운트
* Translate concepts/overview/kubernetes-api in Korean (#10773)
* Translate concepts/overview/kubernetes-api in Korean
* Applied feedback from ianychoi
* kubeadm: update the configuration docs to v1beta1 (#10959)
* kubeadm: add small v1beta1 related updates (#10988)
* ADD content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md (#11031)
* ADD content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md
* ADD content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init.md
* Update content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md
Accepted
Co-Authored-By: YouthLab <tsui@highyouth.com>
* do not change 'master' or 'worker' nodes to '主从'
* Doc updates for volume scheduling GA (#10743)
* Doc updates for volume scheduling GA
* Make trivial change to kick build
* Document nodelease feature (#10699)
* advanced audit doc for ModeBlockingStrict (#10203)
* Rename EncryptionConfig to EncryptionConfiguration (#11080)
EncryptionConfig was renamed to EncryptedConfiguration and added to
the `apiserver.config.k8s.io` API group in Kubernetes 1.13.
The feature was previously in alpha and was not handling versions
properly, which lead to an originally unnoticed `v1` in the docs.
* content/zh/docs/reference/setup-tools/kubeadm/kubeadm-init.md
* trsanlate create-cluster-kubeadm.md to chinese (#11041)
* trsanlate create-cluster-kubeadm.md to chinese
* Update create-cluster-kubeadm.md
* update the feature stage in v1.13 (#11307)
* update new feature gates to document (#11295)
* refresh controller role list on rbac description page (#11290)
* node labeling restriction docs (#10944)
* Update 1.13 docs for CSI GA (#10893)
* dynamic audit documentation (#9947)
* adds dynamic audit documentation
* Copyedit for clarity
See also inline question/s
* Fix feature state shortcode
* Update feature state
* changes wording for dynamic audit flag behavior
* Minor copyedit
* fix dynamic audit yaml
* adds api enablement command to dynamic audit docs
* change ordering dynamic audit appears in
* add references to dynamic audit in webhook backend
* reword dynamic audit reference
* updates stages field for audit sink object
* changes audit sink api definition; rewords policy
* kubeadm: remove kube-proxy workaround (#11162)
* zh-trans content/en/docs/setup/independent/install-kubeadm.md (#11338)
* zh-trans content/en/docs/setup/independent/install-kubeadm.md
* Update install-kubeadm.md
* Update dry run feature to beta (#11140)
* vSphere volume raw block support doc update (#10932)
* Add docs for Windows DNS configurations (#10036)
* Update docs for fields allowed at root of CRD schema (#9973)
* Add docs for Windows DNS configurations
* add device monitoring documentation (#9945)
* kubeadm: adds upgrade instructions for 1.13 (#11138)
* kubeadm: adds upgrade instructions for 1.13
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* add minor copyedits
Addressed a couple of copyedit comments a bit more cleanly.
* kubeadm: add improvements to HA docs (#11094)
* kubeadm: add information and diagrams for HA topologies
* kubeadm: update HA doc with simplified steps
* kubeadm: update HA doc with simplified steps
* edit ha, add new topology topic, reorder by weight
* troubleshoot markdown
* fix more markdown, fix links
* more markdown
* more markdown
* more markdown
* changes after reviewer comments
* add steps about Weave
* update note about stacked topology
* kubeadm external etcd HA upgrade 1.13 (#11364)
* kubeadm external etcd HA upgrade 1.13
Signed-off-by: Ruben Orduz <rubenoz@gmail.com>
* Update stacked controlplane steps
* kubeadm cert documentation (#11093)
* kubeadm certificate API and CSR documentation
* copyedits
* fix typo
* PR for diff docs (#10789)
* Empty commit against dev-1.13 for diff documentation
* Complete Declarative maangement with diff commands
* Second Korean l10n work for dev-1.13. (#11030)
* Update outdated l10n(ko) contents (#10915)
* Translate main menu for l10n(ko) docs (#10916)
* Translate tasks/run-application/horizontal-pod-autoscale-walkthrough (#10980)
* Translate content/ko/docs/concepts/overview/working-with-objects/kubernetes-object in Korean #11104 (#11332)
* Pick-right-solution page translates into Korean. (#11340)
* ko-trans: add jd/..., sap/..., ebay/..., homeoffice/... (#11336)
* Translate concept/workloads/pods/pod-overview.md (#11092)
Co-authored-by: June Yi <june.yi@samsung.com>
Co-authored-by: Jesang Myung <jesang.myung@gmail.com>
Co-authored-by: zerobig <38598117+zer0big@users.noreply.github.com>
Co-authored-by: Claudia J.Kang <claudiajkang@gmail.com>
Co-authored-by: lIuDuI <1693291525@qq.com>
Co-authored-by: Woojin Na(Eddie) <cheapluv@gmail.com>
* Rename encryption-at-rest related objects (#11059)
EncryptionConfig was renamed to EncryptedConfiguration and added to
the `apiserver.config.k8s.io` API group in Kubernetes 1.13.
The feature was previously in alpha and was not handling versions
properly, which lead to an originally unnoticed `v1` in the docs.
Also, the `--experimental-encryption-provider-config` flag is now called
just `--encryption-provider-config`.
* Documenting FlexVolume Resize alpha feature. (#10097)
* CR webhook conversion documentation (#10986)
* CR Conversion
* Addressing comments
* Addressing more comments
* Addressing even more comments
* Addressing even^2 more comments
* Remove references to etcd2 in v1.13 since support has been removed (#11414)
* Remove etcd2 references as etcd2 is deprecated
Link back to the v1.12 version of the etcd3 doc for
the etcd2->etcd3 migration instructions.
I updated the kube-apiserver reference manually,
unsure if that is auto-generated somehow.
The federation-apiserver can still potentially
support etcd2 so I didn't touch that.
* Remove outdated {master,node}.yaml files
There are master/node yaml files that reference
etcd2.service that are likely highly out of date.
I couldn't find any docs that actually reference
these templates so I removed them
* Address review comments
* Final Korean l10n work for dev-1.13 (#11440)
* Update outdated l10n(ko) contents (#11425)
fixes #11424
* Remove references to etcd2 in content/ko (#11416)
* Resolve conflicts against master for /ko contents (#11438)
* Fix unopened caution shortcode
* kubeadm: update the reference docs for 1.13 (#10960)
* docs update to promote TaintBasedEvictions to beta (#10765)
* First Korean l10n work for dev-1.13 (#10719)
* Update outdated l10n(ko) contents (#10689)
fixes #10686
* Translate concepts/overview/what-is-kubernetes in Korean (#10690)
* Translate concepts/overview/what-is-kubernetes in Korean
* Feedback from ClaudiaJKang
* Translate concepts/overview/components in Korean (#10882)
* Translate concepts/overview/components in Korean #10717
* Translate concepts/overview/components in Korean
* Translate concepts/overview/components in Korean
* Apply Korean glossary: 서비스 어카운트
* Translate concepts/overview/kubernetes-api in Korean (#10773)
* Translate concepts/overview/kubernetes-api in Korean
* Applied feedback from ianychoi
* kubeadm: update the configuration docs to v1beta1 (#10959)
* kubeadm: add small v1beta1 related updates (#10988)
* update new feature gates to document (#11295)
* Update dry run feature to beta (#11140)
* kubeadm: add improvements to HA docs (#11094)
* kubeadm: add information and diagrams for HA topologies
* kubeadm: update HA doc with simplified steps
* kubeadm: update HA doc with simplified steps
* edit ha, add new topology topic, reorder by weight
* troubleshoot markdown
* fix more markdown, fix links
* more markdown
* more markdown
* more markdown
* changes after reviewer comments
* add steps about Weave
* update note about stacked topology
* kubeadm: update reference docs
- add section about working with phases under kubeadm-init.md
- update GA / beta status of features
- kubeadm alpha phase was moved to kubeadm init phase
- new commands were added under kubeadm alpha
- included new CoreDNS usage examples
* Generate components and tools reference
* Add generated federation API Reference (#11491)
* Add generated federation API Reference
* Add front matter to federation reference
* Remove whitespace from federation front matter
* Remove more whitespace from federation front matter
* Remove superfluous kubefed reference
* Add frontmatter to generated kubefed reference
* Fix kubefed reference page frontmatter
* Generate kubectl reference docs 1.13 (#11487)
* Generate kubectl reference docs 1.13
* Fix links in kubectl reference
* Add 1.13 API reference (#11489)
* Update config.toml (#11486)
* Update config.toml
Preparing for 1.13 release, updating the config.toml and dropping the 1.8 docs reference.
* update dot releases and docsbranch typo
* adding .Site. to Params.currentUrl (#11503)
see https://github.com/kubernetes/website/pull/11502 for context
* Add 1.13 Release notes (#11499)
2018-12-04 01:21:11 +00:00
apiVersion: apiserver.config.k8s.io/v1
2019-05-09 05:44:47 +00:00
kind: EncryptionConfiguration
2017-06-27 19:41:39 +00:00
resources:
- resources:
2022-02-10 03:27:52 +00:00
- secrets
2022-11-30 03:18:55 +00:00
- configmaps
- pandas.awesome.bears.example
2017-06-27 19:41:39 +00:00
providers:
2022-02-10 03:27:52 +00:00
- aescbc:
keys:
- name: key1
secret: < BASE 64 ENCODED SECRET >
- identity: {}
2017-06-27 19:41:39 +00:00
```
2022-02-10 03:27:52 +00:00
To create a new Secret, perform the following steps:
2017-06-27 19:41:39 +00:00
2022-02-10 03:27:52 +00:00
1. Generate a 32-byte random key and base64 encode it. If you're on Linux or macOS, run the following command:
2017-06-27 19:41:39 +00:00
2020-05-12 18:35:56 +00:00
```shell
head -c 32 /dev/urandom | base64
```
2017-06-27 19:41:39 +00:00
2022-02-10 03:27:52 +00:00
1. Place that value in the `secret` field of the `EncryptionConfiguration` struct.
1. Set the `--encryption-provider-config` flag on the `kube-apiserver` to point to
the location of the config file.
2022-09-22 00:59:08 +00:00
You will need to mount the new encryption config file to the `kube-apiserver` static pod. Here is an example on how to do that:
1. Save the new encryption config file to `/etc/kubernetes/enc/enc.yaml` on the control-plane node.
1. Edit the manifest for the `kube-apiserver` static pod: `/etc/kubernetes/manifests/kube-apiserver.yaml` similarly to this:
```yaml
apiVersion: v1
kind: Pod
metadata:
annotations:
kubeadm.kubernetes.io/kube-apiserver.advertise-address.endpoint: 10.10.30.4:6443
creationTimestamp: null
labels:
component: kube-apiserver
tier: control-plane
name: kube-apiserver
namespace: kube-system
spec:
containers:
- command:
- kube-apiserver
...
- --encryption-provider-config=/etc/kubernetes/enc/enc.yaml # < -- add this line
volumeMounts:
...
- name: enc # < -- add this line
mountPath: /etc/kubernetes/enc # < -- add this line
readonly: true # < -- add this line
...
volumes:
...
- name: enc # < -- add this line
hostPath: # < -- add this line
path: /etc/kubernetes/enc # < -- add this line
type: DirectoryOrCreate # < -- add this line
...
```
2022-02-10 03:27:52 +00:00
1. Restart your API server.
2017-06-27 19:41:39 +00:00
2018-11-06 19:33:04 +00:00
{{< caution > }}
2022-02-10 03:27:52 +00:00
Your config file contains keys that can decrypt the contents in etcd, so you must properly restrict
permissions on your control-plane nodes so only the user who runs the `kube-apiserver` can read it.
2018-11-06 19:33:04 +00:00
{{< / caution > }}
2017-06-27 19:41:39 +00:00
2020-02-06 21:03:25 +00:00
## Verifying that data is encrypted
2017-06-27 19:41:39 +00:00
Data is encrypted when written to etcd. After restarting your `kube-apiserver` , any newly created or
2022-11-30 03:18:55 +00:00
updated Secret or other resource types configured in `EncryptionConfiguration` should be encrypted
when stored. To check this, you can use the `etcdctl` command line
program to retrieve the contents of your secret data.
2017-06-27 19:41:39 +00:00
2022-02-10 03:27:52 +00:00
1. Create a new Secret called `secret1` in the `default` namespace:
2017-06-27 19:41:39 +00:00
2020-05-12 18:35:56 +00:00
```shell
kubectl create secret generic secret1 -n default --from-literal=mykey=mydata
```
2017-06-27 19:41:39 +00:00
2022-02-10 03:27:52 +00:00
1. Using the `etcdctl` command line, read that Secret out of etcd:
2017-06-27 19:41:39 +00:00
2022-12-18 13:48:07 +00:00
```
ETCDCTL_API=3 etcdctl get /registry/secrets/default/secret1 [...] | hexdump -C
```
2020-05-12 18:35:56 +00:00
where `[...]` must be the additional arguments for connecting to the etcd server.
2022-09-22 00:59:08 +00:00
For example:
```shell
ETCDCTL_API=3 etcdctl \
--cacert=/etc/kubernetes/pki/etcd/ca.crt \
--cert=/etc/kubernetes/pki/etcd/server.crt \
--key=/etc/kubernetes/pki/etcd/server.key \
get /registry/secrets/default/secret1 | hexdump -C
```
The output is similar to this (abbreviated):
```hexdump
00000000 2f 72 65 67 69 73 74 72 79 2f 73 65 63 72 65 74 |/registry/secret|
00000010 73 2f 64 65 66 61 75 6c 74 2f 73 65 63 72 65 74 |s/default/secret|
00000020 31 0a 6b 38 73 3a 65 6e 63 3a 61 65 73 63 62 63 |1.k8s:enc:aescbc|
00000030 3a 76 31 3a 6b 65 79 31 3a c7 6c e7 d3 09 bc 06 |:v1:key1:.l.....|
00000040 25 51 91 e4 e0 6c e5 b1 4d 7a 8b 3d b9 c2 7c 6e |%Q...l..Mz.=..|n|
00000050 b4 79 df 05 28 ae 0d 8e 5f 35 13 2c c0 18 99 3e |.y..(..._5.,...>|
[...]
00000110 23 3a 0d fc 28 ca 48 2d 6b 2d 46 cc 72 0b 70 4c |#:..(.H-k-F.r.pL|
00000120 a5 fc 35 43 12 4e 60 ef bf 6f fe cf df 0b ad 1f |..5C.N`..o......|
00000130 82 c4 88 53 02 da 3e 66 ff 0a |...S..>f..|
0000013a
```
2022-02-10 03:27:52 +00:00
1. Verify the stored Secret is prefixed with `k8s:enc:aescbc:v1:` which indicates
2022-11-01 21:26:10 +00:00
the `aescbc` provider has encrypted the resulting data. Confirm that the key name shown in `etcd`
matches the key name specified in the `EncryptionConfiguration` mentioned above. In this example,
2022-11-22 23:18:03 +00:00
you can see that the encryption key named `key1` is used in `etcd` and in `EncryptionConfiguration` .
2017-06-27 19:41:39 +00:00
2022-02-10 03:27:52 +00:00
1. Verify the Secret is correctly decrypted when retrieved via the API:
2017-06-27 19:41:39 +00:00
2020-05-12 18:35:56 +00:00
```shell
2022-09-22 00:59:08 +00:00
kubectl get secret secret1 -n default -o yaml
2020-05-12 18:35:56 +00:00
```
2017-06-27 19:41:39 +00:00
2022-02-10 03:27:52 +00:00
The output should contain `mykey: bXlkYXRh` , with contents of `mydata` encoded, check
[decoding a Secret ](/docs/tasks/configmap-secret/managing-secret-using-kubectl/#decoding-secret )
to completely decode the Secret.
2017-06-27 19:41:39 +00:00
2022-02-10 03:27:52 +00:00
## Ensure all Secrets are encrypted
2017-06-27 19:41:39 +00:00
2022-02-10 03:27:52 +00:00
Since Secrets are encrypted on write, performing an update on a Secret will encrypt that content.
2017-06-27 19:41:39 +00:00
2020-05-12 18:35:56 +00:00
```shell
2017-08-04 13:56:54 +00:00
kubectl get secrets --all-namespaces -o json | kubectl replace -f -
2017-06-27 19:41:39 +00:00
```
2022-02-10 03:27:52 +00:00
The command above reads all Secrets and then updates them to apply server side encryption.
2020-05-12 18:36:38 +00:00
{{< note > }}
2017-06-28 23:37:32 +00:00
If an error occurs due to a conflicting write, retry the command.
For larger clusters, you may wish to subdivide the secrets by namespace or script an update.
2020-05-12 18:36:38 +00:00
{{< / note > }}
2017-06-27 19:41:39 +00:00
## Rotating a decryption key
2022-02-10 03:27:52 +00:00
Changing a Secret without incurring downtime requires a multi-step operation, especially in
the presence of a highly-available deployment where multiple `kube-apiserver` processes are running.
2017-06-27 19:41:39 +00:00
1. Generate a new key and add it as the second key entry for the current provider on all servers
2022-02-10 03:27:52 +00:00
1. Restart all `kube-apiserver` processes to ensure each server can decrypt using the new key
1. Make the new key the first entry in the `keys` array so that it is used for encryption in the config
1. Restart all `kube-apiserver` processes to ensure each server now encrypts using the new key
1. Run `kubectl get secrets --all-namespaces -o json | kubectl replace -f -` to encrypt all
existing Secrets with the new key
1. Remove the old decryption key from the config after you have backed up etcd with the new key in use
and updated all Secrets
2017-06-27 19:41:39 +00:00
2022-02-10 03:27:52 +00:00
When running a single `kube-apiserver` instance, step 2 may be skipped.
2017-06-27 19:41:39 +00:00
## Decrypting all data
2022-02-10 03:27:52 +00:00
To disable encryption at rest, place the `identity` provider as the first entry in the config
and restart all `kube-apiserver` processes.
2017-06-27 19:41:39 +00:00
```yaml
Official 1.13 Release Docs (#11401)
* Update metadata.generation behaviour for custom resources (#10705)
* update docs promoting plugins to beta (#10796)
* docs update to promote TaintBasedEvictions to beta (#10765)
* First Korean l10n work for dev-1.13 (#10719)
* Update outdated l10n(ko) contents (#10689)
fixes #10686
* Translate concepts/overview/what-is-kubernetes in Korean (#10690)
* Translate concepts/overview/what-is-kubernetes in Korean
* Feedback from ClaudiaJKang
* Translate concepts/overview/components in Korean (#10882)
* Translate concepts/overview/components in Korean #10717
* Translate concepts/overview/components in Korean
* Translate concepts/overview/components in Korean
* Apply Korean glossary: 서비스 어카운트
* Translate concepts/overview/kubernetes-api in Korean (#10773)
* Translate concepts/overview/kubernetes-api in Korean
* Applied feedback from ianychoi
* kubeadm: update the configuration docs to v1beta1 (#10959)
* kubeadm: add small v1beta1 related updates (#10988)
* ADD content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md (#11031)
* ADD content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md
* ADD content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init.md
* Update content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md
Accepted
Co-Authored-By: YouthLab <tsui@highyouth.com>
* do not change 'master' or 'worker' nodes to '主从'
* Doc updates for volume scheduling GA (#10743)
* Doc updates for volume scheduling GA
* Make trivial change to kick build
* Document nodelease feature (#10699)
* advanced audit doc for ModeBlockingStrict (#10203)
* Rename EncryptionConfig to EncryptionConfiguration (#11080)
EncryptionConfig was renamed to EncryptedConfiguration and added to
the `apiserver.config.k8s.io` API group in Kubernetes 1.13.
The feature was previously in alpha and was not handling versions
properly, which lead to an originally unnoticed `v1` in the docs.
* content/zh/docs/reference/setup-tools/kubeadm/kubeadm-init.md
* trsanlate create-cluster-kubeadm.md to chinese (#11041)
* trsanlate create-cluster-kubeadm.md to chinese
* Update create-cluster-kubeadm.md
* update the feature stage in v1.13 (#11307)
* update new feature gates to document (#11295)
* refresh controller role list on rbac description page (#11290)
* node labeling restriction docs (#10944)
* Update 1.13 docs for CSI GA (#10893)
* dynamic audit documentation (#9947)
* adds dynamic audit documentation
* Copyedit for clarity
See also inline question/s
* Fix feature state shortcode
* Update feature state
* changes wording for dynamic audit flag behavior
* Minor copyedit
* fix dynamic audit yaml
* adds api enablement command to dynamic audit docs
* change ordering dynamic audit appears in
* add references to dynamic audit in webhook backend
* reword dynamic audit reference
* updates stages field for audit sink object
* changes audit sink api definition; rewords policy
* kubeadm: remove kube-proxy workaround (#11162)
* zh-trans content/en/docs/setup/independent/install-kubeadm.md (#11338)
* zh-trans content/en/docs/setup/independent/install-kubeadm.md
* Update install-kubeadm.md
* Update dry run feature to beta (#11140)
* vSphere volume raw block support doc update (#10932)
* Add docs for Windows DNS configurations (#10036)
* Update docs for fields allowed at root of CRD schema (#9973)
* Add docs for Windows DNS configurations
* add device monitoring documentation (#9945)
* kubeadm: adds upgrade instructions for 1.13 (#11138)
* kubeadm: adds upgrade instructions for 1.13
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* add minor copyedits
Addressed a couple of copyedit comments a bit more cleanly.
* kubeadm: add improvements to HA docs (#11094)
* kubeadm: add information and diagrams for HA topologies
* kubeadm: update HA doc with simplified steps
* kubeadm: update HA doc with simplified steps
* edit ha, add new topology topic, reorder by weight
* troubleshoot markdown
* fix more markdown, fix links
* more markdown
* more markdown
* more markdown
* changes after reviewer comments
* add steps about Weave
* update note about stacked topology
* kubeadm external etcd HA upgrade 1.13 (#11364)
* kubeadm external etcd HA upgrade 1.13
Signed-off-by: Ruben Orduz <rubenoz@gmail.com>
* Update stacked controlplane steps
* kubeadm cert documentation (#11093)
* kubeadm certificate API and CSR documentation
* copyedits
* fix typo
* PR for diff docs (#10789)
* Empty commit against dev-1.13 for diff documentation
* Complete Declarative maangement with diff commands
* Second Korean l10n work for dev-1.13. (#11030)
* Update outdated l10n(ko) contents (#10915)
* Translate main menu for l10n(ko) docs (#10916)
* Translate tasks/run-application/horizontal-pod-autoscale-walkthrough (#10980)
* Translate content/ko/docs/concepts/overview/working-with-objects/kubernetes-object in Korean #11104 (#11332)
* Pick-right-solution page translates into Korean. (#11340)
* ko-trans: add jd/..., sap/..., ebay/..., homeoffice/... (#11336)
* Translate concept/workloads/pods/pod-overview.md (#11092)
Co-authored-by: June Yi <june.yi@samsung.com>
Co-authored-by: Jesang Myung <jesang.myung@gmail.com>
Co-authored-by: zerobig <38598117+zer0big@users.noreply.github.com>
Co-authored-by: Claudia J.Kang <claudiajkang@gmail.com>
Co-authored-by: lIuDuI <1693291525@qq.com>
Co-authored-by: Woojin Na(Eddie) <cheapluv@gmail.com>
* Rename encryption-at-rest related objects (#11059)
EncryptionConfig was renamed to EncryptedConfiguration and added to
the `apiserver.config.k8s.io` API group in Kubernetes 1.13.
The feature was previously in alpha and was not handling versions
properly, which lead to an originally unnoticed `v1` in the docs.
Also, the `--experimental-encryption-provider-config` flag is now called
just `--encryption-provider-config`.
* Documenting FlexVolume Resize alpha feature. (#10097)
* CR webhook conversion documentation (#10986)
* CR Conversion
* Addressing comments
* Addressing more comments
* Addressing even more comments
* Addressing even^2 more comments
* Remove references to etcd2 in v1.13 since support has been removed (#11414)
* Remove etcd2 references as etcd2 is deprecated
Link back to the v1.12 version of the etcd3 doc for
the etcd2->etcd3 migration instructions.
I updated the kube-apiserver reference manually,
unsure if that is auto-generated somehow.
The federation-apiserver can still potentially
support etcd2 so I didn't touch that.
* Remove outdated {master,node}.yaml files
There are master/node yaml files that reference
etcd2.service that are likely highly out of date.
I couldn't find any docs that actually reference
these templates so I removed them
* Address review comments
* Final Korean l10n work for dev-1.13 (#11440)
* Update outdated l10n(ko) contents (#11425)
fixes #11424
* Remove references to etcd2 in content/ko (#11416)
* Resolve conflicts against master for /ko contents (#11438)
* Fix unopened caution shortcode
* kubeadm: update the reference docs for 1.13 (#10960)
* docs update to promote TaintBasedEvictions to beta (#10765)
* First Korean l10n work for dev-1.13 (#10719)
* Update outdated l10n(ko) contents (#10689)
fixes #10686
* Translate concepts/overview/what-is-kubernetes in Korean (#10690)
* Translate concepts/overview/what-is-kubernetes in Korean
* Feedback from ClaudiaJKang
* Translate concepts/overview/components in Korean (#10882)
* Translate concepts/overview/components in Korean #10717
* Translate concepts/overview/components in Korean
* Translate concepts/overview/components in Korean
* Apply Korean glossary: 서비스 어카운트
* Translate concepts/overview/kubernetes-api in Korean (#10773)
* Translate concepts/overview/kubernetes-api in Korean
* Applied feedback from ianychoi
* kubeadm: update the configuration docs to v1beta1 (#10959)
* kubeadm: add small v1beta1 related updates (#10988)
* update new feature gates to document (#11295)
* Update dry run feature to beta (#11140)
* kubeadm: add improvements to HA docs (#11094)
* kubeadm: add information and diagrams for HA topologies
* kubeadm: update HA doc with simplified steps
* kubeadm: update HA doc with simplified steps
* edit ha, add new topology topic, reorder by weight
* troubleshoot markdown
* fix more markdown, fix links
* more markdown
* more markdown
* more markdown
* changes after reviewer comments
* add steps about Weave
* update note about stacked topology
* kubeadm: update reference docs
- add section about working with phases under kubeadm-init.md
- update GA / beta status of features
- kubeadm alpha phase was moved to kubeadm init phase
- new commands were added under kubeadm alpha
- included new CoreDNS usage examples
* Generate components and tools reference
* Add generated federation API Reference (#11491)
* Add generated federation API Reference
* Add front matter to federation reference
* Remove whitespace from federation front matter
* Remove more whitespace from federation front matter
* Remove superfluous kubefed reference
* Add frontmatter to generated kubefed reference
* Fix kubefed reference page frontmatter
* Generate kubectl reference docs 1.13 (#11487)
* Generate kubectl reference docs 1.13
* Fix links in kubectl reference
* Add 1.13 API reference (#11489)
* Update config.toml (#11486)
* Update config.toml
Preparing for 1.13 release, updating the config.toml and dropping the 1.8 docs reference.
* update dot releases and docsbranch typo
* adding .Site. to Params.currentUrl (#11503)
see https://github.com/kubernetes/website/pull/11502 for context
* Add 1.13 Release notes (#11499)
2018-12-04 01:21:11 +00:00
apiVersion: apiserver.config.k8s.io/v1
2019-05-09 05:44:47 +00:00
kind: EncryptionConfiguration
2017-06-27 19:41:39 +00:00
resources:
- resources:
2022-02-10 03:27:52 +00:00
- secrets
2017-06-27 19:41:39 +00:00
providers:
2022-02-10 03:27:52 +00:00
- identity: {}
- aescbc:
keys:
- name: key1
secret: < BASE 64 ENCODED SECRET >
2017-06-27 19:41:39 +00:00
```
2022-12-18 13:48:07 +00:00
Then run the following command to force decrypt all Secrets:
2022-02-10 03:27:52 +00:00
2020-05-12 18:35:56 +00:00
```shell
kubectl get secrets --all-namespaces -o json | kubectl replace -f -
```
2022-02-10 03:27:52 +00:00
## {{% heading "whatsnext" %}}
* Learn more about the [EncryptionConfiguration configuration API (v1) ](/docs/reference/config-api/apiserver-encryption.v1/ ).