@@ -246,7 +246,7 @@ The name of a RoleBinding or ClusterRoleBinding object must be a valid
246
246
# ## RoleBinding 和 ClusterRoleBinding {#rolebinding-and-clusterrolebinding}
247
247
248
248
角色绑定(Role Binding)是将角色中定义的权限赋予一个或者一组用户。
249
- 它包含若干 **主体**(用户、组或服务账户)的列表和对这些主体所获得的角色的引用。
249
+ 它包含若干**主体(Subject) **(用户、组或服务账户)的列表和对这些主体所获得的角色的引用。
250
250
RoleBinding 在指定的名字空间中执行授权,而 ClusterRoleBinding 在集群范围执行授权。
251
251
252
252
一个 RoleBinding 可以引用同一的名字空间中的任何 Role。
@@ -293,7 +293,7 @@ roleRef:
293
293
` ` ` yaml
294
294
apiVersion: rbac.authorization.k8s.io/v1
295
295
# 此角色绑定允许 "jane" 读取 "default" 名字空间中的 Pod
296
- # 你需要在该命名空间中有一个名为 “pod-reader” 的 Role
296
+ # 你需要在该名字空间中有一个名为 “pod-reader” 的 Role
297
297
kind: RoleBinding
298
298
metadata:
299
299
name: read-pods
@@ -325,7 +325,7 @@ RoleBinding 所在名字空间的资源。这种引用使得你可以跨整个
325
325
之后在多个名字空间中复用。
326
326
327
327
例如,尽管下面的 RoleBinding 引用的是一个 ClusterRole,"dave"(这里的主体,
328
- 区分大小写)只能访问 "development" 名字空间中的 Secrets 对象,因为 RoleBinding
328
+ 区分大小写)只能访问 "development" 名字空间中的 Secret 对象,因为 RoleBinding
329
329
所在的名字空间(由其 metadata 决定)是 "development"。
330
330
331
331
<!--
@@ -352,7 +352,7 @@ roleRef:
352
352
-->
353
353
` ` ` yaml
354
354
apiVersion: rbac.authorization.k8s.io/v1
355
- # 此角色绑定使得用户 "dave" 能够读取 "development" 名字空间中的 Secrets
355
+ # 此角色绑定使得用户 "dave" 能够读取 "development" 名字空间中的 Secret
356
356
# 你需要一个名为 "secret-reader" 的 ClusterRole
357
357
kind: RoleBinding
358
358
metadata:
@@ -472,7 +472,7 @@ _subresource_, such as the logs for a Pod. A request for a Pod's logs looks like
472
472
在 Kubernetes API 中,大多数资源都是使用对象名称的字符串表示来呈现与访问的。
473
473
例如,对于 Pod 应使用 "pods"。
474
474
RBAC 使用对应 API 端点的 URL 中呈现的名字来引用资源。
475
- 有一些 Kubernetes API 涉及 **子资源(subresource)**,例如 Pod 的日志。
475
+ 有一些 Kubernetes API 涉及**子资源(subresource)**,例如 Pod 的日志。
476
476
对 Pod 日志的请求看起来像这样:
477
477
478
478
` ` ` http
@@ -559,8 +559,8 @@ For example, `kubectl get configmaps --field-selector=metadata.name=my-configmap
559
559
{{< /note >}}
560
560
561
561
<!--
562
- Rather than referring to individual `resources`、 `apiGroups`, and `verbs`,
563
- you can use the wildcard `*` symbol to refer to all such objects.
562
+ Rather than referring to individual `resources`, `apiGroups` and `verbs`,
563
+ you can use the wildcard `*` symbol to refer to all such objects.
564
564
For `nonResourceURLs`, you can use the wildcard `*` as a suffix glob match.
565
565
For `resourceNames`, an empty set means that everything is allowed.
566
566
Here is an example that allows access to perform any current and future action on
@@ -960,7 +960,7 @@ so that authentication produces usernames in the format you want.
960
960
-->
961
961
# ## 对主体的引用 {#referring-to-subjects}
962
962
963
- RoleBinding 或者 ClusterRoleBinding 可绑定角色到某 **主体(Subject)** 上。
963
+ RoleBinding 或者 ClusterRoleBinding 可绑定角色到某**主体(Subject)**上。
964
964
主体可以是组,用户或者{{< glossary_tooltip text="服务账户" term_id="service-account" >}}。
965
965
966
966
Kubernetes 用字符串来表示用户名。
@@ -1397,7 +1397,7 @@ the contents of Secrets enables access to ServiceAccount credentials
1397
1397
in the namespace, which would allow API access as any ServiceAccount
1398
1398
in the namespace (a form of privilege escalation).
1399
1399
-->
1400
- 此角色不允许查看 Secrets ,因为读取 Secret 的内容意味着可以访问名字空间中
1400
+ 此角色不允许查看 Secret ,因为读取 Secret 的内容意味着可以访问名字空间中
1401
1401
ServiceAccount 的凭据信息,进而允许利用名字空间中任何 ServiceAccount
1402
1402
的身份访问 API(这是一种特权提升)。
1403
1403
</td>
@@ -1764,9 +1764,9 @@ You can only create/update a role binding if you already have all the permission
1764
1764
For example, if `user-1` does not have the ability to list Secrets cluster-wide, they cannot create a ClusterRoleBinding
1765
1765
to a role that grants that permission. To allow a user to create/update role bindings :
1766
1766
-->
1767
- # ## 对角色绑定创建或更新的限制 {#restrictions-on-role-binding-creation-or-update}
1767
+ # ## 对角色绑定创建或更新的限制 {#restrictions-on-role-binding-creation-or-update}
1768
1768
1769
- 只有你已经具有了所引用的角色中包含的全部权限时,**或者** 你被授权在所引用的角色上执行 `bind`
1769
+ 只有你已经具有了所引用的角色中包含的全部权限时,**或者**你被授权在所引用的角色上执行 `bind`
1770
1770
动词时,你才可以创建或更新角色绑定。这里的权限与角色绑定的作用域相同。
1771
1771
例如,如果用户 `user-1` 没有列举集群范围所有 Secret 的能力,则他不可以创建
1772
1772
ClusterRoleBinding 引用授予该许可权限的角色。
@@ -2389,7 +2389,7 @@ Any application running in a container receives service account credentials auto
2389
2389
and could perform any action against the API, including viewing secrets and modifying permissions.
2390
2390
This is not a recommended policy.
2391
2391
-->
2392
- 下面的策略允许 **所有** 服务帐户充当集群管理员。
2392
+ 下面的策略允许**所有**服务帐户充当集群管理员。
2393
2393
容器中运行的所有应用程序都会自动收到服务帐户的凭据,可以对 API 执行任何操作,
2394
2394
包括查看 Secret 和修改权限。这一策略是不被推荐的。
2395
2395
0 commit comments