Skip to content

Commit f84789b

Browse files
verbTim Bannister
andauthored
Improve clarity of projected account token behavior
Co-authored-by: Tim Bannister <[email protected]>
1 parent 31416af commit f84789b

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

content/en/docs/concepts/storage/projected-volumes.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,21 @@ The [proposal](https://github.com/kubernetes/enhancements/tree/master/keps/sig-s
7777

7878
#### Linux
7979

80-
Kubernetes will improve security for serviceAccountToken files when all containers
81-
have the same `runAsUser` set in
80+
In some cases, Kubernetes applies a security optimization for the contents of`serviceAccountToken`
81+
volumes.
82+
When all containers in a pod have the same `runAsUser` set in their
8283
[`PodSecurityContext`](/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context)
8384
or container
84-
[`SecurityContext`](/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1)
85-
by setting the file owner to the `runAsUser` and the file mode to `0600`.
85+
[`SecurityContext`](/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1),
86+
then the kubelet ensures that the contents of the `serviceAccountToken` volume are owned by that user,
87+
and that every file has its permission mode set to `0600`.
8688

87-
Note that {{< glossary_tooltip text="ephemeral containers" term_id="ephemeral-container" >}}
88-
aren't present when the pod is created. Adding an ephemeral container to a pod
89-
will not change the permissions that were set when the pod was created.
89+
{{< note >}}
90+
If you add any {{< glossary_tooltip text="ephemeral containers" term_id="ephemeral-container" >}} to
91+
a Pod, those won't have been present when the pod started running on that node.
92+
Adding an ephemeral container to a pod does **not** change any volume permissions
93+
that were set when the pod was created.
94+
{{< /note >}}
9095

9196
#### Windows
9297

0 commit comments

Comments
 (0)