Immutable secrets doc (#19297)
This commit is contained in:
committed by
GitHub
parent
e746d344c9
commit
d343728f44
@@ -676,6 +676,37 @@ A container using a Secret as a
|
|||||||
Secret updates.
|
Secret updates.
|
||||||
{{< /note >}}
|
{{< /note >}}
|
||||||
|
|
||||||
|
{{< feature-state for_k8s_version="v1.18" state="alpha" >}}
|
||||||
|
|
||||||
|
The Kubernetes alpha feature _Immutable Secrets and ConfigMaps_ provides an option to set
|
||||||
|
individual Secrets and ConfigMaps as immutable. For clusters that extensively use Secrets
|
||||||
|
(at least tens of thousands of unique Secret to Pod mounts), preventing changes to their
|
||||||
|
data has the following advantages:
|
||||||
|
|
||||||
|
- protects you from accidental (or unwanted) updates that could cause applications outages
|
||||||
|
- improves performance of your cluster by significantly reducing load on kube-apiserver, by
|
||||||
|
closing watches for secrets marked as immutable.
|
||||||
|
|
||||||
|
To use this feature, enable the `ImmutableEmphemeralVolumes`
|
||||||
|
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) and set
|
||||||
|
your Secret or ConfigMap `immutable` field to `true`. For example:
|
||||||
|
```yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
...
|
||||||
|
data:
|
||||||
|
...
|
||||||
|
immutable: true
|
||||||
|
```
|
||||||
|
|
||||||
|
{{< note >}}
|
||||||
|
Once a Secret or ConfigMap is marked as immutable, it is _not_ possible to revert this change
|
||||||
|
nor to mutate the contents of the `data` field. You can only delete and recreate the Secret.
|
||||||
|
Existing Pods maintain a mount point to the deleted Secret - it is recommended to recreate
|
||||||
|
these pods.
|
||||||
|
{{< /note >}}
|
||||||
|
|
||||||
### Using Secrets as environment variables
|
### Using Secrets as environment variables
|
||||||
|
|
||||||
To use a secret in an {{< glossary_tooltip text="environment variable" term_id="container-env-variables" >}}
|
To use a secret in an {{< glossary_tooltip text="environment variable" term_id="container-env-variables" >}}
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ different Kubernetes components.
|
|||||||
| `HPAScaleToZero` | `false` | Alpha | 1.16 | |
|
| `HPAScaleToZero` | `false` | Alpha | 1.16 | |
|
||||||
| `HugePageStorageMediumSize` | `false` | Alpha | 1.18 | |
|
| `HugePageStorageMediumSize` | `false` | Alpha | 1.18 | |
|
||||||
| `HyperVContainer` | `false` | Alpha | 1.10 | |
|
| `HyperVContainer` | `false` | Alpha | 1.10 | |
|
||||||
|
| `ImmutableEphemeralVolumes` | `false` | Alpha | 1.18 | |
|
||||||
| `KubeletPodResources` | `false` | Alpha | 1.13 | 1.14 |
|
| `KubeletPodResources` | `false` | Alpha | 1.13 | 1.14 |
|
||||||
| `KubeletPodResources` | `true` | Beta | 1.15 | |
|
| `KubeletPodResources` | `true` | Beta | 1.15 | |
|
||||||
| `LegacyNodeRoleBehavior` | `true` | Alpha | 1.16 | |
|
| `LegacyNodeRoleBehavior` | `true` | Alpha | 1.16 | |
|
||||||
@@ -403,6 +404,7 @@ Each feature gate is designed for enabling/disabling a specific feature:
|
|||||||
- `HugePageStorageMediumSize`: Enable support for multiple sizes pre-allocated [huge pages](/docs/tasks/manage-hugepages/scheduling-hugepages/).
|
- `HugePageStorageMediumSize`: Enable support for multiple sizes pre-allocated [huge pages](/docs/tasks/manage-hugepages/scheduling-hugepages/).
|
||||||
- `HyperVContainer`: Enable [Hyper-V isolation](https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/hyperv-container) for Windows containers.
|
- `HyperVContainer`: Enable [Hyper-V isolation](https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/hyperv-container) for Windows containers.
|
||||||
- `HPAScaleToZero`: Enables setting `minReplicas` to 0 for `HorizontalPodAutoscaler` resources when using custom or external metrics.
|
- `HPAScaleToZero`: Enables setting `minReplicas` to 0 for `HorizontalPodAutoscaler` resources when using custom or external metrics.
|
||||||
|
- `ImmutableEphemeralVolumes`: Allows for marking individual Secrets and ConfigMaps as immutable for better safety and performance.
|
||||||
- `KubeletConfigFile`: Enable loading kubelet configuration from a file specified using a config file.
|
- `KubeletConfigFile`: Enable loading kubelet configuration from a file specified using a config file.
|
||||||
See [setting kubelet parameters via a config file](/docs/tasks/administer-cluster/kubelet-config-file/) for more details.
|
See [setting kubelet parameters via a config file](/docs/tasks/administer-cluster/kubelet-config-file/) for more details.
|
||||||
- `KubeletPluginsWatcher`: Enable probe-based plugin watcher utility to enable kubelet
|
- `KubeletPluginsWatcher`: Enable probe-based plugin watcher utility to enable kubelet
|
||||||
|
|||||||
Reference in New Issue
Block a user