File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
content/en/docs/concepts/storage Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,23 @@ In Linux pods that have a projected volume and `RunAsUser` set in the Pod
82
82
the projected files have the correct ownership set including container user
83
83
ownership.
84
84
85
+ When all containers in a pod have the same ` runAsUser ` set in their
86
+ [ ` PodSecurityContext ` ] ( /docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context )
87
+ or container
88
+ [ ` SecurityContext ` ] ( /docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1 ) ,
89
+ then the kubelet ensures that the contents of the ` serviceAccountToken ` volume are owned by that user,
90
+ and the token file has its permission mode set to ` 0600 ` .
91
+
92
+ {{< note >}}
93
+ {{< glossary_tooltip text="Ephemeral containers" term_id="ephemeral-container" >}}
94
+ added to a Pod after it is created do * not* change volume permissions that were
95
+ set when the pod was created.
96
+
97
+ If a Pod's ` serviceAccountToken ` volume permissions were set to ` 0600 ` because
98
+ all other containers in the Pod have the same ` runAsUser ` , ephemeral
99
+ containers must use the same ` runAsUser ` to be able to read the token.
100
+ {{< /note >}}
101
+
85
102
### Windows
86
103
87
104
In Windows pods that have a projected volume and ` RunAsUsername ` set in the
You can’t perform that action at this time.
0 commit comments