22title : 准入控制器参考
33linkTitle : 准入控制器
44content_type : concept
5- weight : 30
5+ weight : 40
66---
77<!--
88reviewers:
@@ -15,14 +15,14 @@ reviewers:
1515title: Admission Controllers Reference
1616linkTitle: Admission Controllers
1717content_type: concept
18- weight: 30
18+ weight: 40
1919-->
2020
2121<!-- overview -->
2222<!--
2323This page provides an overview of Admission Controllers.
2424-->
25- 此页面提供准入控制器(Admission Controllers )的概述。
25+ 此页面提供准入控制器(Admission Controller )的概述。
2626
2727<!-- body -->
2828
@@ -69,7 +69,7 @@ Kubernetes {{< skew currentVersion >}}
6969并编译进 ` kube-apiserver ` 可执行文件,并且只能由集群管理员配置。
7070在该列表中,有两个特殊的控制器:MutatingAdmissionWebhook 和 ValidatingAdmissionWebhook。
7171它们根据 API 中的配置,
72- 分别执行变更和验证[ 准入控制 webhook ] ( /zh-cn/docs/reference/access-authn-authz/extensible-admission-controllers/#admission-webhooks ) 。
72+ 分别执行变更和验证[ 准入控制 Webhook ] ( /zh-cn/docs/reference/access-authn-authz/extensible-admission-controllers/#admission-webhooks ) 。
7373
7474<!--
7575## Admission control phases
@@ -1401,80 +1401,6 @@ for more information.
14011401
14021402详情请参见 [Pod 开销](/zh-cn/docs/concepts/scheduling-eviction/pod-overhead/)。
14031403
1404- # ## SecurityContextDeny {#securitycontextdeny}
1405-
1406- <!--
1407- **Type**: Validating.
1408- -->
1409- **类别**:验证。
1410-
1411- {{< feature-state for_k8s_version="v1.27" state="deprecated" >}}
1412-
1413- {{< caution >}}
1414- <!--
1415- The Kubernetes project recommends that you **do not use** the
1416- ` SecurityContextDeny` admission controller.
1417-
1418- The `SecurityContextDeny` admission controller plugin is deprecated and disabled
1419- by default. It will be removed in a future version. If you choose to enable the
1420- ` SecurityContextDeny` admission controller plugin, you must enable the
1421- ` SecurityContextDeny` feature gate as well.
1422- -->
1423- Kubernetes 项目建议你**不要使用** `SecurityContextDeny` 准入控制器。
1424-
1425- ` SecurityContextDeny` 准入控制器插件已被弃用,并且默认处于禁用状态。
1426- 此插件将在后续的版本中被移除。如果你选择启用 `SecurityContextDeny` 准入控制器插件,
1427- 也必须同时启用 `SecurityContextDeny` 特性门控。
1428-
1429- <!--
1430- The `SecurityContextDeny` admission plugin is deprecated because it is outdated
1431- and incomplete; it may be unusable or not do what you would expect. As
1432- implemented, this plugin is unable to restrict all security-sensitive attributes
1433- of the Pod API. For example, the `privileged` and `ephemeralContainers` fields
1434- were never restricted by this plugin.
1435- -->
1436- ` SecurityContextDeny` 准入插件已被弃用,因为它已经过时且不完整;
1437- 它可能无法使用或无法达到你的预期。该插件实现之时,就无法限制 Pod API 的所有与安全相关的属性。
1438- 例如,`privileged` 和 `ephemeralContainers` 字段就从未受过此插件的限制。
1439-
1440- <!--
1441- The [Pod Security Admission](/docs/concepts/security/pod-security-admission/)
1442- plugin enforcing the [Pod Security Standards](/docs/concepts/security/pod-security-standards/)
1443- ` Restricted` profile captures what this plugin was trying to achieve in a better
1444- and up-to-date way.
1445- -->
1446- 采用 [Pod 安全性标准](/zh-cn/docs/concepts/security/pod-security-standards/)中的 `Restricted`
1447- 方案的 [Pod 安全性准入](/zh-cn/docs/concepts/security/pod-security-admission/)插件,
1448- 能以更好和最新的方式来表述此插件所要实现的目标。
1449- {{< /caution >}}
1450-
1451- <!--
1452- This admission controller will deny any Pod that attempts to set the following
1453- [SecurityContext](/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context)
1454- fields :
1455- -->
1456- 此准入控制器将拒绝任何尝试设置以下
1457- [SecurityContext](/zh-cn/docs/tasks/configure-pod-container/security-context/)
1458- 字段的 Pod:
1459-
1460- - ` .spec.securityContext.supplementalGroups`
1461- - ` .spec.securityContext.seLinuxOptions`
1462- - ` .spec.securityContext.runAsUser`
1463- - ` .spec.securityContext.fsGroup`
1464- - ` .spec.(init)Containers[*].securityContext.seLinuxOptions`
1465- - ` .spec.(init)Containers[*].securityContext.runAsUser`
1466-
1467- <!--
1468- For more historical context on this plugin, see
1469- [The birth of PodSecurityPolicy](/blog/2022/08/23/podsecuritypolicy-the-historical-context/#the-birth-of-podsecuritypolicy)
1470- from the Kubernetes blog article about PodSecurityPolicy and its removal. The
1471- article details the PodSecurityPolicy historical context and the birth of the
1472- ` securityContext` field for Pods.
1473- -->
1474- 有关此插件的更多历史背景,请参阅 Kubernetes 博客中这篇有关 PodSecurityPolicy 及其移除的文章:
1475- [The birth of PodSecurityPolicy](/blog/2022/08/23/podsecuritypolicy-the-historical-context/#the-birth-of-podsecuritypolicy)。
1476- 这篇文章详细地介绍了 PodSecurityPolicy 的历史背景以及 Pod 的 `securityContext` 字段的诞生。
1477-
14781404# ## ServiceAccount {#serviceaccount}
14791405
14801406<!--
0 commit comments