@@ -717,38 +717,6 @@ A container using a Secret as a
717
717
Secret updates.
718
718
{{< /note >}}
719
719
720
- {{< feature-state for_k8s_version="v1.19" state="beta" >}}
721
-
722
- The Kubernetes beta feature _ Immutable Secrets and ConfigMaps_ provides an option to set
723
- individual Secrets and ConfigMaps as immutable. For clusters that extensively use Secrets
724
- (at least tens of thousands of unique Secret to Pod mounts), preventing changes to their
725
- data has the following advantages:
726
-
727
- - protects you from accidental (or unwanted) updates that could cause applications outages
728
- - improves performance of your cluster by significantly reducing load on kube-apiserver, by
729
- closing watches for secrets marked as immutable.
730
-
731
- This feature is controlled by the ` ImmutableEphemeralVolumes ` [ feature
732
- gate] ( /docs/reference/command-line-tools-reference/feature-gates/ ) ,
733
- which is enabled by default since v1.19. You can create an immutable
734
- Secret by setting the ` immutable ` field to ` true ` . For example,
735
- ``` yaml
736
- apiVersion : v1
737
- kind : Secret
738
- metadata :
739
- ...
740
- data :
741
- ...
742
- immutable : true
743
- ` ` `
744
-
745
- {{< note >}}
746
- Once a Secret or ConfigMap is marked as immutable, it is _not_ possible to revert this change
747
- nor to mutate the contents of the ` data` field. You can only delete and recreate the Secret.
748
- Existing Pods maintain a mount point to the deleted Secret - it is recommended to recreate
749
- these pods.
750
- {{< /note >}}
751
-
752
720
### Using Secrets as environment variables
753
721
754
722
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:
809
777
1f2d1e2e67df
810
778
```
811
779
780
+ ## Immutable Secrets {#secret-immutable}
781
+
782
+ {{< feature-state for_k8s_version="v1.19" state="beta" >}}
783
+
784
+ The Kubernetes beta feature _ Immutable Secrets and ConfigMaps_ provides an option to set
785
+ individual Secrets and ConfigMaps as immutable. For clusters that extensively use Secrets
786
+ (at least tens of thousands of unique Secret to Pod mounts), preventing changes to their
787
+ data has the following advantages:
788
+
789
+ - protects you from accidental (or unwanted) updates that could cause applications outages
790
+ - improves performance of your cluster by significantly reducing load on kube-apiserver, by
791
+ closing watches for secrets marked as immutable.
792
+
793
+ This feature is controlled by the ` ImmutableEphemeralVolumes ` [ feature
794
+ gate] ( /docs/reference/command-line-tools-reference/feature-gates/ ) ,
795
+ which is enabled by default since v1.19. You can create an immutable
796
+ Secret by setting the ` immutable ` field to ` true ` . For example,
797
+ ``` yaml
798
+ apiVersion : v1
799
+ kind : Secret
800
+ metadata :
801
+ ...
802
+ data :
803
+ ...
804
+ immutable : true
805
+ ` ` `
806
+
807
+ {{< note >}}
808
+ Once a Secret or ConfigMap is marked as immutable, it is _not_ possible to revert this change
809
+ nor to mutate the contents of the ` data` field. You can only delete and recreate the Secret.
810
+ Existing Pods maintain a mount point to the deleted Secret - it is recommended to recreate
811
+ these pods.
812
+ {{< /note >}}
813
+
812
814
# ## Using imagePullSecrets
813
815
814
816
The `imagePullSecrets` field is a list of references to secrets in the same namespace.
0 commit comments