@@ -177,7 +177,8 @@ CertificateApproval, CertificateSigning, CertificateSubjectRestriction, DefaultI
177
177
{{< feature-state for_k8s_version="v1.13" state="deprecated" >}}
178
178
179
179
<!--
180
- This admission controller allows all pods into the cluster. It is deprecated because its behavior is the same as if there were no admission controller at all.
180
+ This admission controller allows all pods into the cluster. It is deprecated because
181
+ its behavior is the same as if there were no admission controller at all.
181
182
-->
182
183
该准入控制器允许所有的 Pod 进入集群。此插件已被弃用,因其行为与没有准入控制器一样。
183
184
@@ -332,55 +333,6 @@ The default value for `default-not-ready-toleration-seconds` and `default-unreac
332
333
` default-not-ready-toleration-seconds ` 和 ` default-unreachable-toleration-seconds `
333
334
的默认值是 5 分钟。
334
335
335
- ### DenyEscalatingExec {#denyescalatingexec}
336
-
337
- {{< feature-state for_k8s_version="v1.13" state="deprecated" >}}
338
-
339
- <!--
340
- This admission controller will deny exec and attach commands to pods that run with escalated privileges that
341
- allow host access. This includes pods that run as privileged, have access to the host IPC namespace, and
342
- have access to the host PID namespace.
343
- -->
344
- 此准入控制器将拒绝在由于拥有提级特权而具备访问宿主机能力的 Pod 中执行 exec 和
345
- attach 命令。这类 Pod 包括在特权模式运行的 Pod、可以访问主机 IPC 名字空间的 Pod、
346
- 和访问主机 PID 名字空间的 Pod。
347
-
348
- <!--
349
- The DenyEscalatingExec admission plugin is deprecated.
350
-
351
- Use of a policy-based admission plugin (like [PodSecurityPolicy](#podsecuritypolicy) or a custom admission plugin)
352
- which can be targeted at specific users or Namespaces and also protects against creation of overly privileged Pods
353
- is recommended instead.
354
- -->
355
- DenyEscalatingExec 准入插件已被弃用。
356
-
357
- 建议使用基于策略的准入插件(例如 [ PodSecurityPolicy] ( #podsecuritypolicy ) 和自定义准入插件),
358
- 这类插件可以针对特定用户或名字空间,还可以防止创建权限过高的 Pod。
359
-
360
- ### DenyExecOnPrivileged {#denyexeconprivileged}
361
-
362
- {{< feature-state for_k8s_version="v1.13" state="deprecated" >}}
363
-
364
- <!--
365
- This admission controller will intercept all requests to exec a command in a pod if that pod has a privileged container.
366
- -->
367
- 如果一个 Pod 中存在特权容器,该准入控制器将拦截所有在该 Pod 中执行 exec 命令的请求。
368
-
369
- <!--
370
- This functionality has been merged into [DenyEscalatingExec](#denyescalatingexec).
371
- The DenyExecOnPrivileged admission plugin is deprecated.
372
- -->
373
- 此功能已合并至 [ DenyEscalatingExec] ( #denyescalatingexec ) 。
374
- 而 DenyExecOnPrivileged 准入插件已被弃用。
375
-
376
- <!--
377
- Use of a policy-based admission plugin (like [PodSecurityPolicy](#podsecuritypolicy) or a custom admission plugin)
378
- which can be targeted at specific users or Namespaces and also protects against creation of overly privileged Pods
379
- is recommended instead.
380
- -->
381
- 建议使用基于策略的准入插件(例如 [ PodSecurityPolicy] ( #podsecuritypolicy ) 和自定义准入插件),
382
- 这类插件可以针对特定用户或名字空间,还可以防止创建权限过高的 Pod。
383
-
384
336
### DenyServiceExternalIPs {#denyserviceexternalips}
385
337
386
338
<!--
@@ -406,7 +358,7 @@ of it.
406
358
大多数用户根本不需要此特性,集群管理员应考虑将其禁用。
407
359
确实需要使用此特性的集群应考虑使用一些自定义策略来管理 ` externalIPs ` 的使用。
408
360
409
- ### EventRateLimit {#eventratelimit}
361
+ ### EventRateLimit {#eventratelimit}
410
362
411
363
{{< feature-state for_k8s_version="v1.13" state="alpha" >}}
412
364
@@ -425,14 +377,14 @@ event requests. The cluster admin can specify event rate limits by:
425
377
* 在通过 API 服务器的命令行标志 ` --admission-control-config-file ` 设置的文件中,
426
378
引用 ` EventRateLimit ` 配置文件:
427
379
428
- ``` yaml
429
- apiVersion : apiserver.config.k8s.io/v1
430
- kind : AdmissionConfiguration
431
- plugins :
432
- - name : EventRateLimit
433
- path : eventconfig.yaml
434
- ...
435
- ```
380
+ ``` yaml
381
+ apiVersion : apiserver.config.k8s.io/v1
382
+ kind : AdmissionConfiguration
383
+ plugins :
384
+ - name : EventRateLimit
385
+ path : eventconfig.yaml
386
+ ...
387
+ ```
436
388
437
389
<!--
438
390
There are four types of limits that can be specified in the configuration:
@@ -472,10 +424,14 @@ limits:
472
424
<!--
473
425
See the [EventRateLimit Config API (v1alpha1)](/docs/reference/config-api/apiserver-eventratelimit.v1alpha1/)
474
426
for more details.
427
+
428
+ This admission controller is disabled by default.
475
429
-->
476
430
详情请参见
477
431
[EventRateLimit 配置 API 文档(v1alpha1)](/zh-cn/docs/reference/config-api/apiserver-eventratelimit.v1alpha1/)。
478
432
433
+ 此准入控制器默认被禁用。
434
+
479
435
### ExtendedResourceToleration {#extendedresourcetoleration}
480
436
481
437
<!--
@@ -485,20 +441,28 @@ If operators want to create dedicated nodes with extended resources (like GPUs,
485
441
name as the key. This admission controller, if enabled, automatically
486
442
adds tolerations for such taints to pods requesting extended resources, so users don't have to manually
487
443
add these tolerations.
444
+
445
+ This admission controller is diabled by default.
488
446
-->
489
447
此插件有助于创建带有扩展资源的专用节点。
490
448
如果运维人员想要创建带有扩展资源(如 GPU、FPGA 等)的专用节点,他们应该以扩展资源名称作为键名,
491
449
[为节点设置污点](/zh-cn/docs/concepts/scheduling-eviction/taint-and-toleration/)。
492
450
如果启用了此准入控制器,会将此类污点的容忍度自动添加到请求扩展资源的 Pod 中,
493
451
用户不必再手动添加这些容忍度。
494
452
453
+ 此准入控制器默认被禁用。
454
+
495
455
### ImagePolicyWebhook {#imagepolicywebhook}
496
456
497
457
<!--
498
458
The ImagePolicyWebhook admission controller allows a backend webhook to make admission decisions.
459
+
460
+ This admission controller is disabled by default.
499
461
-->
500
462
ImagePolicyWebhook 准入控制器允许使用后端 Webhook 做出准入决策。
501
463
464
+ 此准入控制器默认被禁用。
465
+
502
466
<!--
503
467
#### Configuration File Format
504
468
@@ -533,8 +497,8 @@ Reference the ImagePolicyWebhook configuration file from the file provided to th
533
497
apiVersion: apiserver.config.k8s.io/v1
534
498
kind: AdmissionConfiguration
535
499
plugins:
536
- - name: ImagePolicyWebhook
537
- path: imagepolicyconfig.yaml
500
+ - name: ImagePolicyWebhook
501
+ path: imagepolicyconfig.yaml
538
502
...
539
503
` ` `
540
504
@@ -547,14 +511,14 @@ Alternatively, you can embed the configuration directly in the file:
547
511
apiVersion: apiserver.config.k8s.io/v1
548
512
kind: AdmissionConfiguration
549
513
plugins:
550
- - name: ImagePolicyWebhook
551
- configuration:
552
- imagePolicy:
553
- kubeConfigFile: <kubeconfig 文件路径>
554
- allowTTL: 50
555
- denyTTL: 50
556
- retryBackoff: 500
557
- defaultAllow: true
514
+ - name: ImagePolicyWebhook
515
+ configuration:
516
+ imagePolicy:
517
+ kubeConfigFile: <kubeconfig 文件路径>
518
+ allowTTL: 50
519
+ denyTTL: 50
520
+ retryBackoff: 500
521
+ defaultAllow: true
558
522
` ` `
559
523
560
524
<!--
@@ -577,34 +541,34 @@ kubeconfig 文件的 `clusters` 字段需要指向远端服务,`users` 字段
577
541
` ` ` yaml
578
542
# clusters refers to the remote service.
579
543
clusters:
580
- - name: name-of-remote-imagepolicy-service
581
- cluster:
582
- certificate-authority: /path/to/ca.pem # CA for verifying the remote service.
583
- server: https://images.example.com/policy # URL of remote service to query. Must use 'https'.
544
+ - name: name-of-remote-imagepolicy-service
545
+ cluster:
546
+ certificate-authority: /path/to/ca.pem # CA for verifying the remote service.
547
+ server: https://images.example.com/policy # URL of remote service to query. Must use 'https'.
584
548
585
549
# users refers to the API server's webhook configuration.
586
550
users:
587
- - name: name-of-api-server
588
- user:
589
- client-certificate: /path/to/cert.pem # cert for the webhook admission controller to use
590
- client-key: /path/to/key.pem # key matching the cert
551
+ - name: name-of-api-server
552
+ user:
553
+ client-certificate: /path/to/cert.pem # cert for the webhook admission controller to use
554
+ client-key: /path/to/key.pem # key matching the cert
591
555
` ` `
592
556
-->
593
557
594
558
` ` ` yaml
595
559
# clusters 指的是远程服务。
596
560
clusters:
597
- - name: name-of-remote-imagepolicy-service
598
- cluster:
599
- certificate-authority: /path/to/ca.pem # CA 用于验证远程服务
600
- server: https://images.example.com/policy # 要查询的远程服务的 URL,必须是 'https'。
561
+ - name: name-of-remote-imagepolicy-service
562
+ cluster:
563
+ certificate-authority: /path/to/ca.pem # CA 用于验证远程服务
564
+ server: https://images.example.com/policy # 要查询的远程服务的 URL,必须是 'https'。
601
565
602
566
# users 指的是 API 服务器的 Webhook 配置。
603
567
users:
604
- - name: name-of-api-server
605
- user:
606
- client-certificate: /path/to/cert.pem # Webhook 准入控制器使用的证书
607
- client-key: /path/to/key.pem # 证书匹配的密钥
568
+ - name: name-of-api-server
569
+ user:
570
+ client-certificate: /path/to/cert.pem # Webhook 准入控制器使用的证书
571
+ client-key: /path/to/key.pem # 证书匹配的密钥
608
572
` ` `
609
573
610
574
<!--
@@ -748,10 +712,14 @@ In any case, the annotations are provided by the user and are not validated by K
748
712
<!--
749
713
This admission controller denies any pod that defines `AntiAffinity` topology key other than
750
714
` kubernetes.io/hostname` in `requiredDuringSchedulingRequiredDuringExecution`.
715
+
716
+ This admission controller is disabled by default.
751
717
-->
752
718
此准入控制器拒绝定义了 `AntiAffinity` 拓扑键的任何 Pod
753
719
(`requiredDuringSchedulingRequiredDuringExecution` 中的 `kubernetes.io/hostname` 除外)。
754
720
721
+ 此准入控制器默认被禁用。
722
+
755
723
# ## LimitRanger {#limitranger}
756
724
757
725
<!--
@@ -1001,15 +969,17 @@ If the admission controller doesn't support automatic labelling your PersistentV
1001
969
may need to add the labels manually to prevent pods from mounting volumes from
1002
970
a different zone. PersistentVolumeLabel is DEPRECATED and labeling persistent volumes has been taken over by
1003
971
the {{< glossary_tooltip text="cloud-controller-manager" term_id="cloud-controller-manager" >}}.
1004
- Starting from 1.11, this admission controller is disabled by default.
972
+
973
+ This admission controller is disabled by default.
1005
974
-->
1006
975
此准入控制器会自动将由云提供商(如 GCE、AWS)定义的区(region)或区域(zone)
1007
976
标签附加到 PersistentVolume 上。这有助于确保 Pod 和 PersistentVolume 位于相同的区或区域。
1008
977
如果准入控制器不支持为 PersistentVolumes 自动添加标签,那你可能需要手动添加标签,
1009
978
以防止 Pod 挂载其他区域的卷。
1010
- PersistentVolumeLabel 已被弃用,为持久卷添加标签的操作已由
1011
- {{< glossary_tooltip text="云管理控制器" term_id="cloud-controller-manager" >}}接管。
1012
- 从 1.11 开始,默认情况下禁用此准入控制器。
979
+ PersistentVolumeLabel 已被弃用,
980
+ 为持久卷添加标签的操作已由{{< glossary_tooltip text="云管理控制器" term_id="cloud-controller-manager" >}}接管。
981
+
982
+ 此准入控制器默认被禁用。
1013
983
1014
984
# ## PodNodeSelector {#podnodeselector}
1015
985
@@ -1018,9 +988,13 @@ PersistentVolumeLabel 已被弃用,为持久卷添加标签的操作已由
1018
988
<!--
1019
989
This admission controller defaults and limits what node selectors may be used within a namespace
1020
990
by reading a namespace annotation and a global configuration.
991
+
992
+ This admission controller is disabled by default.
1021
993
-->
1022
994
此准入控制器通过读取名字空间注解和全局配置,来为名字空间中可以使用的节点选择器设置默认值并实施限制。
1023
995
996
+ 此准入控制器默认被禁用。
997
+
1024
998
<!--
1025
999
# ### Configuration file format
1026
1000
@@ -1036,9 +1010,9 @@ This file may be json or yaml and has the following format:
1036
1010
1037
1011
` ` ` yaml
1038
1012
podNodeSelectorPluginConfig:
1039
- clusterDefaultNodeSelector: name-of-node-selector
1040
- namespace1: name-of-node-selector
1041
- namespace2: name-of-node-selector
1013
+ clusterDefaultNodeSelector: name-of-node-selector
1014
+ namespace1: name-of-node-selector
1015
+ namespace2: name-of-node-selector
1042
1016
` ` `
1043
1017
1044
1018
<!--
@@ -1052,8 +1026,8 @@ command line flag `--admission-control-config-file`:
1052
1026
apiVersion: apiserver.config.k8s.io/v1
1053
1027
kind: AdmissionConfiguration
1054
1028
plugins:
1055
- - name: PodNodeSelector
1056
- path: podnodeselector.yaml
1029
+ - name: PodNodeSelector
1030
+ path: podnodeselector.yaml
1057
1031
...
1058
1032
` ` `
1059
1033
@@ -1198,6 +1172,11 @@ metadata:
1198
1172
scheduler.alpha.kubernetes.io/tolerationsWhitelist: '[{"operator": "Exists", "effect": "NoSchedule", "key": "dedicated-node"}]'
1199
1173
` ` `
1200
1174
1175
+ <!--
1176
+ This admission controller is disabled by default.
1177
+ -->
1178
+ 此准入控制器默认被禁用。
1179
+
1201
1180
<!--
1202
1181
# ## Priority {#priority}
1203
1182
@@ -1232,8 +1211,6 @@ and the [example of Resource Quota](/docs/concepts/policy/resource-quotas/) for
1232
1211
1233
1212
# ## RuntimeClass {#runtimeclass}
1234
1213
1235
- {{< feature-state for_k8s_version="v1.20" state="stable" >}}
1236
-
1237
1214
<!--
1238
1215
If you define a RuntimeClass with [Pod overhead](/docs/concepts/scheduling-eviction/pod-overhead/)
1239
1216
configured, this admission controller checks incoming Pods.
@@ -1278,7 +1255,7 @@ then you could use this admission controller to restrict the set of values a sec
1278
1255
See [Pod Security Standards](/docs/concepts/security/pod-security-standards/) for more context on restricting
1279
1256
pod privileges.
1280
1257
-->
1281
- 有关限制 Pod 权限的更多内容,请参阅
1258
+ 有关限制 Pod 权限的更多内容,请参阅
1282
1259
[Pod 安全标准](/zh-cn/docs/concepts/security/pod-security-standards/)。
1283
1260
1284
1261
# ## ServiceAccount {#serviceaccount}
@@ -1313,8 +1290,6 @@ for more detailed information.
1313
1290
1314
1291
# ## TaintNodesByCondition {#taintnodesbycondition}
1315
1292
1316
- {{< feature-state for_k8s_version="v1.17" state="stable" >}}
1317
-
1318
1293
<!--
1319
1294
This admission controller {{< glossary_tooltip text="taints" term_id="taint" >}} newly created
1320
1295
Nodes as `NotReady` and `NoSchedule`. That tainting avoids a race condition that could cause Pods
@@ -1325,7 +1300,7 @@ conditions.
1325
1300
这些污点能够避免一些竞态条件的发生,而这类竞态条件可能导致 Pod
1326
1301
在更新节点污点以准确反映其所报告状况之前,就被调度到新节点上。
1327
1302
1328
- # ## ValidatingAdmissionWebhook {#validatingadmissionwebhook}
1303
+ # ## ValidatingAdmissionWebhook {#validatingadmissionwebhook}
1329
1304
1330
1305
<!--
1331
1306
This admission controller calls any validating webhooks which match the request. Matching
@@ -1349,12 +1324,10 @@ webhooks or other validating admission controllers will permit the request to fi
1349
1324
<!--
1350
1325
If you disable the ValidatingAdmissionWebhook, you must also disable the
1351
1326
` ValidatingWebhookConfiguration` object in the `admissionregistration.k8s.io/v1`
1352
- group/version via the `--runtime-config` flag (both are on by default in
1353
- versions 1.9 and later).
1327
+ group/version via the `--runtime-config` flag.
1354
1328
-->
1355
1329
如果你禁用了 ValidatingAdmissionWebhook,还必须通过 `--runtime-config` 标志来禁用
1356
- ` admissionregistration.k8s.io/v1` 组/版本中的 `ValidatingWebhookConfiguration`
1357
- 对象(默认情况下在 v1.9 和更高版本中均处于启用状态)。
1330
+ ` admissionregistration.k8s.io/v1` 组/版本中的 `ValidatingWebhookConfiguration` 对象。
1358
1331
1359
1332
<!--
1360
1333
# # Is there a recommended set of admission controllers to use?
0 commit comments