Skip to content

Commit 422f91b

Browse files
authored
Merge pull request #46370 from asa3311/sync-zh-119
[zh] sync service-accounts disruptions kubelet-config-file
2 parents 44eec58 + 366f513 commit 422f91b

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

content/zh-cn/docs/concepts/security/service-accounts.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -343,20 +343,20 @@ following methods:
343343
<!--
344344
* [Service Account Token Secrets](/docs/tasks/configure-pod-container/configure-service-account/#manually-create-an-api-token-for-a-serviceaccount)
345345
(not recommended): You can mount service account tokens as Kubernetes
346-
Secrets in Pods. These tokens don't expire and don't rotate.
347-
This method is not recommended, especially at scale, because of the risks associated
348-
with static, long-lived credentials. In Kubernetes v1.24 and later, the
349-
[LegacyServiceAccountTokenNoAutoGeneration feature gate](/docs/reference/command-line-tools-reference/feature-gates/#feature-gates-for-graduated-or-deprecated-features)
350-
prevents Kubernetes from automatically creating these tokens for
351-
ServiceAccounts. `LegacyServiceAccountTokenNoAutoGeneration` is enabled
352-
by default; in other words, Kubernetes does not create these tokens.
346+
Secrets in Pods. These tokens don't expire and don't rotate. In versions prior to v1.24, a permanent token was automatically created for each service account.
347+
This method is not recommended anymore, especially at scale, because of the risks associated
348+
with static, long-lived credentials. The [LegacyServiceAccountTokenNoAutoGeneration feature gate](/docs/reference/command-line-tools-reference/feature-gates-removed)
349+
(which was enabled by default from Kubernetes v1.24 to v1.26), prevented Kubernetes from automatically creating these tokens for
350+
ServiceAccounts. The feature gate is removed in v1.27, because it was elevated to GA status; you can still create indefinite service account tokens manually, but should take into account the security implications.
353351
-->
354352
* [服务账号令牌 Secret](/zh-cn/docs/tasks/configure-pod-container/configure-service-account/#manually-create-an-api-token-for-a-serviceaccount)(不推荐):
355353
你可以将服务账号令牌以 Kubernetes Secret 的形式挂载到 Pod 中。这些令牌不会过期且不会轮换。
356-
不推荐使用此方法,特别是在大规模场景下,这是因为静态、长期有效的凭据存在一定的风险。在 Kubernetes v1.24 及更高版本中,
357-
[LegacyServiceAccountTokenNoAutoGeneration 特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/#feature-gates-for-graduated-or-deprecated-features)阻止
358-
Kubernetes 自动为 ServiceAccount 创建这些令牌。`LegacyServiceAccountTokenNoAutoGeneration` 默认被启用,
359-
也就是说,Kubernetes 不会创建这些令牌。
354+
在 v1.24 版本之前,系统会为每个服务账户自动创建一个永久令牌。此方法已不再被推荐,
355+
尤其是在大规模应用时,因为使用静态、长期有效的凭证存在风险。
356+
[LegacyServiceAccountTokenNoAutoGeneration 特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates-removed)
357+
(从 Kubernetes v1.24 至 v1.26 默认启用),阻止 Kubernetes 自动为 ServiceAccount 创建这些令牌。
358+
此特性门控在 v1.27 版本中被移除,因为此特性已升级为正式发布(GA)状态;
359+
你仍然可以手动为 ServiceAccount 创建无限期的服务账户令牌,但应考虑到安全影响。
360360

361361
{{< note >}}
362362
<!--

0 commit comments

Comments
 (0)