Add headings for Immutable ConfigMaps and Secrets
This commit is contained in:
@@ -213,6 +213,8 @@ when new keys are projected to the Pod can be as long as the kubelet sync period
|
|||||||
propagation delay, where the cache propagation delay depends on the chosen cache type
|
propagation delay, where the cache propagation delay depends on the chosen cache type
|
||||||
(it equals to watch propagation delay, ttl of cache, or zero correspondingly).
|
(it equals to watch propagation delay, ttl of cache, or zero correspondingly).
|
||||||
|
|
||||||
|
## Immutable ConfigMaps {#configmap-immutable}
|
||||||
|
|
||||||
{{< feature-state for_k8s_version="v1.19" state="beta" >}}
|
{{< feature-state for_k8s_version="v1.19" state="beta" >}}
|
||||||
|
|
||||||
The Kubernetes beta feature _Immutable Secrets and ConfigMaps_ provides an option to set
|
The Kubernetes beta feature _Immutable Secrets and ConfigMaps_ provides an option to set
|
||||||
|
|||||||
@@ -717,38 +717,6 @@ A container using a Secret as a
|
|||||||
Secret updates.
|
Secret updates.
|
||||||
{{< /note >}}
|
{{< /note >}}
|
||||||
|
|
||||||
{{< feature-state for_k8s_version="v1.19" state="beta" >}}
|
|
||||||
|
|
||||||
The Kubernetes beta 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.
|
|
||||||
|
|
||||||
This feature is controlled by the `ImmutableEphemeralVolumes` [feature
|
|
||||||
gate](/docs/reference/command-line-tools-reference/feature-gates/),
|
|
||||||
which is enabled by default since v1.19. You can create an immutable
|
|
||||||
Secret by setting the `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" >}}
|
||||||
@@ -809,6 +777,40 @@ The output is similar to:
|
|||||||
1f2d1e2e67df
|
1f2d1e2e67df
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Immutable Secrets {#secret-immutable}
|
||||||
|
|
||||||
|
{{< feature-state for_k8s_version="v1.19" state="beta" >}}
|
||||||
|
|
||||||
|
The Kubernetes beta 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.
|
||||||
|
|
||||||
|
This feature is controlled by the `ImmutableEphemeralVolumes` [feature
|
||||||
|
gate](/docs/reference/command-line-tools-reference/feature-gates/),
|
||||||
|
which is enabled by default since v1.19. You can create an immutable
|
||||||
|
Secret by setting the `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 imagePullSecrets
|
### Using imagePullSecrets
|
||||||
|
|
||||||
The `imagePullSecrets` field is a list of references to secrets in the same namespace.
|
The `imagePullSecrets` field is a list of references to secrets in the same namespace.
|
||||||
|
|||||||
Reference in New Issue
Block a user