You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/concepts/configuration/secret.md
+23-25Lines changed: 23 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -201,25 +201,8 @@ If you want to access data from a Secret in a Pod, one way to do that is to
201
201
have Kubernetes make the value of that Secret be available as a file inside
202
202
the filesystem of one or more of the Pod's containers.
203
203
204
-
{{< note >}}
205
-
Versions of Kubernetes before v1.22 automatically created credentials for accessing
206
-
the Kubernetes API. This older mechanism was based on creating token Secrets that
207
-
could then be mounted into running Pods.
208
-
In more recent versions, including Kubernetes v{{< skew currentVersion >}}, API credentials
209
-
are obtained directly by using the [TokenRequest](/docs/reference/kubernetes-api/authentication-resources/token-request-v1/) API,
210
-
and are mounted into Pods using a [projected volume](/docs/reference/access-authn-authz/service-accounts-admin/#bound-service-account-token-volume).
211
-
The tokens obtained using this method have bounded lifetimes, and are automatically
212
-
invalidated when the Pod they are mounted into is deleted.
213
-
214
-
You can still [manually create](/docs/tasks/configure-pod-container/configure-service-account/#manually-create-a-service-account-api-token)
215
-
a service account token Secret; for example, if you need a token that never expires.
216
-
However, using the [TokenRequest](/docs/reference/kubernetes-api/authentication-resources/token-request-v1/)
217
-
subresource to obtain a token to access the API is recommended instead.
218
-
You can use the [`kubectl create token`](/docs/reference/generated/kubectl/kubectl-commands#-em-token-em-)
219
-
command to obtain a token from the `TokenRequest` API.
220
-
{{< /note >}}
221
-
222
-
#### Mounted Secrets are updated automatically
204
+
For instructions, refer to
205
+
[Distribute credentials securely using Secrets](/docs/tasks/inject-data-application/distribute-credentials-secure/#create-a-pod-that-has-access-to-the-secret-data-through-a-volume).
223
206
224
207
When a volume contains data from a Secret, and that Secret is updated, Kubernetes tracks
225
208
this and updates the data in the volume, using an eventually-consistent approach.
@@ -638,13 +621,28 @@ A `kubernetes.io/service-account-token` type of Secret is used to store a
0 commit comments