@@ -380,8 +380,7 @@ secrets in any namespace.
380
380
# ### ClusterRoleBinding 示例 {#clusterrolebinding-example}
381
381
382
382
要跨整个集群完成访问权限的授予,你可以使用一个 ClusterRoleBinding。
383
- 下面的 ClusterRoleBinding 允许 "manager" 组内的所有用户访问任何名字空间中的
384
- Secrets。
383
+ 下面的 ClusterRoleBinding 允许 "manager" 组内的所有用户访问任何名字空间中的 Secret。
385
384
386
385
<!--
387
386
` ` ` yaml
@@ -446,7 +445,7 @@ the new role (as opposed to enabling or accidentally modifying only the roleRef
446
445
without verifying all of the existing subjects should be given the new role's
447
446
permissions).
448
447
-->
449
- 2. 针对不同角色的绑定是完全不一样的绑定。要求通过删除/重建绑定来更改 `roleRef`,
448
+ 2. 针对不同角色的绑定是完全不一样的绑定。要求通过删除/重建绑定来更改 `roleRef`,
450
449
这样可以确保要赋予绑定的所有主体会被授予新的角色(而不是在允许或者不小心修改了
451
450
` roleRef` 的情况下导致所有现有主体未经验证即被授予新角色对应的权限)。
452
451
@@ -602,7 +601,6 @@ only the permissions required for the workload to function correctly are applied
602
601
使用具体的 resources 和 verbs 确保仅赋予工作负载正常运行所需的权限。
603
602
{{< /caution >}}
604
603
605
-
606
604
<!--
607
605
# ## Aggregated ClusterRoles
608
606
@@ -672,7 +670,7 @@ metadata:
672
670
# the rules below will be added to the "monitoring" ClusterRole.
673
671
rules:
674
672
- apiGroups: [""]
675
- resources: ["services", "endpoints ", "pods"]
673
+ resources: ["services", "endpointslices ", "pods"]
676
674
verbs: ["get", "list", "watch"]
677
675
` ` `
678
676
-->
@@ -687,7 +685,7 @@ metadata:
687
685
# 下面的规则会被添加到 "monitoring" ClusterRole 中
688
686
rules:
689
687
- apiGroups: [""]
690
- resources: ["services", "endpoints ", "pods"]
688
+ resources: ["services", "endpointslices ", "pods"]
691
689
verbs: ["get", "list", "watch"]
692
690
` ` `
693
691
@@ -1327,17 +1325,17 @@ Allows admin access, intended to be granted within a namespace using a <b>RoleBi
1327
1325
If used in a <b>RoleBinding</b>, allows read/write access to most resources in a namespace,
1328
1326
including the ability to create roles and role bindings within the namespace.
1329
1327
This role does not allow write access to resource quota or to the namespace itself.
1330
- This role also does not allow write access to Endpoints in clusters created
1328
+ This role also does not allow write access to EndpointSlices (or Endpoints) in clusters created
1331
1329
using Kubernetes v1.22+. More information is available in the
1332
- ["Write Access for Endpoints" section](#write-access-for-endpoints).
1330
+ ["Write Access for EndpointSlices and Endpoints" section](#write-access-for-endpoints).
1333
1331
-->
1334
1332
允许管理员访问权限,旨在使用 <b>RoleBinding</b> 在名字空间内执行授权。
1335
1333
1336
1334
如果在 <b>RoleBinding</b> 中使用,则可授予对名字空间中的大多数资源的读/写权限,
1337
1335
包括创建角色和角色绑定的能力。
1338
1336
此角色不允许对资源配额或者名字空间本身进行写操作。
1339
- 此角色也不允许对 Kubernetes v1.22+ 创建的 Endpoints 进行写操作。
1340
- 更多信息参阅 [“Endpoints 写权限”小节](#write-access-for-endpoints)。
1337
+ 此角色也不允许对 Kubernetes v1.22+ 创建的 EndpointSlices(或 Endpoints) 进行写操作。
1338
+ 更多信息参阅 [“EndpointSlices 和 Endpoints 写权限”小节](#write-access-for-endpoints)。
1341
1339
</td>
1342
1340
</tr>
1343
1341
<tr>
@@ -1352,17 +1350,17 @@ Allows read/write access to most objects in a namespace.
1352
1350
This role does not allow viewing or modifying roles or role bindings.
1353
1351
However, this role allows accessing Secrets and running Pods as any ServiceAccount in
1354
1352
the namespace, so it can be used to gain the API access levels of any ServiceAccount in
1355
- the namespace. This role also does not allow write access to Endpoints in
1353
+ the namespace. This role also does not allow write access to EndpointSlices (or Endpoints) in
1356
1354
clusters created using Kubernetes v1.22+. More information is available in the
1357
- ["Write Access for Endpoints" section](#write-access-for-endpoints).
1355
+ ["Write Access for EndpointSlices and Endpoints" section](#write-access-for-endpoints).
1358
1356
-->
1359
1357
允许对名字空间的大多数对象进行读/写操作。
1360
1358
1361
1359
此角色不允许查看或者修改角色或者角色绑定。
1362
1360
不过,此角色可以访问 Secret,以名字空间中任何 ServiceAccount 的身份运行 Pod,
1363
1361
所以可以用来了解名字空间内所有服务账户的 API 访问级别。
1364
- 此角色也不允许对 Kubernetes v1.22+ 创建的 Endpoints 进行写操作。
1365
- 更多信息参阅 [“Endpoints 写操作”小节](#write-access-for-endpoints)。
1362
+ 此角色也不允许对 Kubernetes v1.22+ 创建的 EndpointSlices(或 Endpoints) 进行写操作。
1363
+ 更多信息参阅 [“EndpointSlices 和 Endpoints 写操作”小节](#write-access-for-endpoints)。
1366
1364
</td>
1367
1365
</tr>
1368
1366
<tr>
@@ -2258,18 +2256,18 @@ In order from most secure to least secure, the approaches are:
2258
2256
` ` `
2259
2257
2260
2258
<!--
2261
- # # Write access for Endpoints
2259
+ # # Write access for EndpointSlices and Endpoints {#write-access-for-endpoints}
2262
2260
2263
2261
Kubernetes clusters created before Kubernetes v1.22 include write access to
2264
- Endpoints in the aggregated "edit" and "admin" roles. As a mitigation for
2265
- [CVE-2021-25740](https://github.com/kubernetes/kubernetes/issues/103675), this
2266
- access is not part of the aggregated roles in clusters that you create using
2262
+ EndpointSlices (and Endpoints) in the aggregated "edit" and "admin" roles.
2263
+ As a mitigation for [CVE-2021-25740](https://github.com/kubernetes/kubernetes/issues/103675),
2264
+ this access is not part of the aggregated roles in clusters that you create using
2267
2265
Kubernetes v1.22 or later.
2268
2266
-->
2269
- # # Endpoints 写权限 {#write-access-for-endpoints}
2267
+ # # EndpointSlices 和 Endpoints 写权限 {#write-access-for-endpoints}
2270
2268
2271
2269
在 Kubernetes v1.22 之前版本创建的集群里,
2272
- “edit” 和 “admin” 聚合角色包含对 Endpoints 的写权限。
2270
+ “edit” 和 “admin” 聚合角色包含对 EndpointSlices(和 Endpoints) 的写权限。
2273
2271
作为 [CVE-2021-25740](https://github.com/kubernetes/kubernetes/issues/103675) 的缓解措施,
2274
2272
此访问权限不包含在 Kubernetes 1.22 以及更高版本集群的聚合角色里。
2275
2273
0 commit comments