Skip to content

Commit

Permalink
Update more links
Browse files Browse the repository at this point in the history
  • Loading branch information
gaoguangze111 committed Sep 27, 2020
1 parent fda4f5b commit a854254
Show file tree
Hide file tree
Showing 11 changed files with 179 additions and 194 deletions.
13 changes: 5 additions & 8 deletions content/zh/docs/reference/access-authn-authz/abac.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ properties:
- Non-resource-matching properties:
- `nonResourcePath`, type string; non-resource request paths.
- Ex: `/version` or `/apis`
- Wildcard:
- Wildcard:
- `*` matches all non-resource requests.
- `/foo/*` matches all subpaths of `/foo/`.
- `readonly`, type boolean, when true, means that the Resource-matching policy only applies to get, list, and watch operations, Non-resource-matching policy only applies to get operation.
Expand All @@ -73,7 +73,7 @@ properties:

基于 `ABAC` 模式,可以这样指定策略文件 `--authorization-policy-file=SOME_FILENAME`

此文件格式是 [JSON Lines](http://jsonlines.org/),不应存在封闭的列表或映射,每行一个映射。
此文件格式是 [JSON Lines](https://jsonlines.org/),不应存在封闭的列表或映射,每行一个映射。

每一行都是一个策略对象,策略对象是具有以下属性的映射:

Expand Down Expand Up @@ -213,7 +213,7 @@ Kubectl 使用 api-server 的 `/api` 和 `/apis` 端点来发现服务资源类
{"apiVersion": "abac.authorization.kubernetes.io/v1beta1", "kind": "Policy", "spec": {"user": "kubelet", "namespace": "*", "resource": "events"}}
```
-->

## 例子 {#examples}

1. Alice 可以对所有资源做任何事情:
Expand Down Expand Up @@ -270,7 +270,7 @@ system:serviceaccount:<namespace>:<serviceaccountname>

-->

[完整文件示例](http://releases.k8s.io/{{< param "githubbranch" >}}/pkg/auth/authorizer/abac/example_policy_file.jsonl)
[完整文件示例](https://releases.k8s.io/{{< param "githubbranch" >}}/pkg/auth/authorizer/abac/example_policy_file.jsonl)

## 服务帐户的快速说明

Expand All @@ -287,7 +287,7 @@ Creating a new namespace leads to the creation of a new service account in the f
system:serviceaccount:<namespace>:default
```
For example, if you wanted to grant the default service account (in the `kube-system` namespace) full
For example, if you wanted to grant the default service account (in the `kube-system` namespace) full
privilege to the API using ABAC, you would add this line to your policy file:
```json
Expand All @@ -310,6 +310,3 @@ system:serviceaccount:<namespace>:default
```

需要重新启动 apiserver 以获取新的策略行。



Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ webhooks](/docs/reference/access-authn-authz/extensible-admission-controllers/#a
which are configured in the API.
-->

准入控制器是一段代码,它会在请求通过认证和授权之后、对象被持久化之前拦截到达 API 服务器的请求。控制器由下面的[列表](#what-does-each-admission-controller-do)组成,并编译进 `kube-apiserver` 二进制文件,并且只能由集群管理员配置。在该列表中,有两个特殊的控制器:MutatingAdmissionWebhook 和 ValidatingAdmissionWebhook。它们根据 API 中的配置,分别执行变更和验证[准入控制 webhook](/docs/reference/access-authn-authz/extensible-admission-controllers/#admission-webhooks)
准入控制器是一段代码,它会在请求通过认证和授权之后、对象被持久化之前拦截到达 API 服务器的请求。控制器由下面的[列表](#what-does-each-admission-controller-do)组成,并编译进 `kube-apiserver` 二进制文件,并且只能由集群管理员配置。在该列表中,有两个特殊的控制器:MutatingAdmissionWebhook 和 ValidatingAdmissionWebhook。它们根据 API 中的配置,分别执行变更和验证[准入控制 webhook](/zh/docs/reference/access-authn-authz/extensible-admission-controllers/#admission-webhooks)


<!--
Expand Down Expand Up @@ -231,7 +231,7 @@ See [persistent volume](/docs/concepts/storage/persistent-volumes/) documentatio
storage classes and how to mark a storage class as default.
-->

关于持久化卷和存储类,以及如何将存储类标记为默认,请参见[持久化卷](/docs/concepts/storage/persistent-volumes/)
关于持久化卷和存储类,以及如何将存储类标记为默认,请参见[持久化卷](/zh/docs/concepts/storage/persistent-volumes/)

### DefaultTolerationSeconds {#defaulttolerationseconds}

Expand Down Expand Up @@ -395,7 +395,7 @@ add these tolerations.
该插件有助于创建可扩展资源的专用节点。
如果运营商想创建可扩展资源的专用节点(如 GPU、FPGA 等),
那他们应该以扩展资源名称作为键名,[为节点设置污点](/docs/concepts/configuration/taint-and-toleration/#example-use-cases)。
那他们应该以扩展资源名称作为键名,[为节点设置污点](/zh/docs/concepts/scheduling-eviction/taint-and-toleration/)。
如果启用了该准入控制器,会将此类污点的容忍自动添加到请求扩展资源的 Pod 中,用户不必再手动添加这些容忍。
### ImagePolicyWebhook {#imagepolicywebhook}
Expand Down Expand Up @@ -505,7 +505,7 @@ plugins:
The ImagePolicyWebhook config file must reference a [kubeconfig](/docs/concepts/cluster-administration/authenticate-across-clusters-kubeconfig/) formatted file which sets up the connection to the backend. It is required that the backend communicate over TLS.
-->

ImagePolicyWebhook 的配置文件必须引用 [kubeconfig](/docs/concepts/cluster-administration/authenticate-across-clusters-kubeconfig/) 格式的文件,该文件设置了到后端的连接,要求后端使用 TLS 进行通信。
ImagePolicyWebhook 的配置文件必须引用 [kubeconfig](/zh/docs/tasks/access-application-cluster/configure-access-multiple-clusters/) 格式的文件,该文件设置了到后端的连接,要求后端使用 TLS 进行通信。

<!--
The kubeconfig file's cluster field must point to the remote service, and the user field must contain the returned authorizer.
Expand Down Expand Up @@ -550,7 +550,7 @@ users:
For additional HTTP configuration, refer to the [kubeconfig](/docs/concepts/cluster-administration/authenticate-across-clusters-kubeconfig/) documentation.
-->

HTTP 更多的配置,请参阅 [kubeconfig](/docs/concepts/cluster-administration/authenticate-across-clusters-kubeconfig/) 文档。
HTTP 更多的配置,请参阅 [kubeconfig](/zh/docs/tasks/access-application-cluster/configure-access-multiple-clusters/) 文档。

<!--
#### Request Payloads
Expand Down Expand Up @@ -683,7 +683,7 @@ applies a 0.1 CPU requirement to all Pods in the `default` namespace.
See the [limitRange design doc](https://git.k8s.io/community/contributors/design-proposals/resource-management/admission_control_limit_range.md) and the [example of Limit Range](/docs/tasks/configure-pod-container/limit-range/) for more details.
-->

请查看 [limitRange 设计文档](https://git.k8s.io/community/contributors/design-proposals/resource-management/admission_control_limit_range.md) 和 [Limit Range 例子](/docs/tasks/configure-pod-container/limit-range/)了解更多细节。
请查看 [limitRange 设计文档](https://git.k8s.io/community/contributors/design-proposals/resource-management/admission_control_limit_range.md) 和 [Limit Range 例子](/zh/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/)了解更多细节。

### MutatingAdmissionWebhook {#mutatingadmissionwebhook} {{< feature-state for_k8s_version="v1.13" state="beta" >}}

Expand Down Expand Up @@ -852,7 +852,7 @@ Starting from 1.11, this admission controller is disabled by default.
该准入控制器会自动将区(region)或区域(zone)标签附加到由云提供商(如 GCE、AWS)定义的 PersistentVolumes 中。
这有助于确保 Pod 和 PersistentVolume 位于相同的区或区域。
如果准入控制器不支持为 PersistentVolumes 自动添加标签,那你可能需要手动添加标签,以防止 Pod 挂载其他区域的卷。
PersistentVolumeLabel 已被废弃,标记持久卷已由[云管理控制器](/docs/tasks/administer-cluster/running-cloud-controller/)接管。
PersistentVolumeLabel 已被废弃,标记持久卷已由[云管理控制器](/zh/docs/tasks/administer-cluster/running-cloud-controller/)接管。
从 1.11 开始,默认情况下禁用此准入控制器。

### PodNodeSelector {#podnodeselector}
Expand Down Expand Up @@ -1005,7 +1005,7 @@ allowVolumeExpansion: true
For more information about persistent volume claims, see [PersistentVolumeClaims](/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims).
-->

关于持久化卷申领的更多信息,请参见 [PersistentVolumeClaims](/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims)。
关于持久化卷申领的更多信息,请参见 [PersistentVolumeClaims](/zh/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims)。

### PodPreset {#podpreset}

Expand Down Expand Up @@ -1037,7 +1037,7 @@ extensions group (`--runtime-config=extensions/v1beta1/podsecuritypolicy=true`).
See also [Pod Security Policy documentation](/docs/concepts/policy/pod-security-policy/)
for more information.
-->
查看 [Pod 安全策略文档](/docs/concepts/policy/pod-security-policy/)了解更多细节。
查看 [Pod 安全策略文档](/zh/docs/concepts/policy/pod-security-policy/)了解更多细节。

### PodTolerationRestriction {#podtolerationrestriction}

Expand Down Expand Up @@ -1094,7 +1094,7 @@ objects in your Kubernetes deployment, you MUST use this admission controller to
<!--
See the [resourceQuota design doc](https://git.k8s.io/community/contributors/design-proposals/resource-management/admission_control_resource_quota.md) and the [example of Resource Quota](/docs/concepts/policy/resource-quotas/) for more details.
-->
请查看 [resourceQuota 设计文档](https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md)和 [Resource Quota 例子](/docs/concepts/policy/resource-quotas/)了解更多细节。
请查看 [resourceQuota 设计文档](https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md)和 [Resource Quota 例子](/zh/docs/concepts/policy/resource-quotas/)了解更多细节。


<!--
Expand All @@ -1109,33 +1109,33 @@ for more information.

### 容器运行时类 {#runtimeclass} {{< feature-state for_k8s_version="v1.16" state="alpha" >}}

[容器运行时类](/docs/concepts/containers/runtime-class/)定义描述了与运行 Pod 相关的开销。此准入控制器将相应地设置 pod.Spec.Overhead 字段。
[容器运行时类](/zh/docs/concepts/containers/runtime-class/)定义描述了与运行 Pod 相关的开销。此准入控制器将相应地设置 pod.Spec.Overhead 字段。

详情请参见 [Pod 开销](/docs/concepts/configuration/pod-overhead/)。
详情请参见 [Pod 开销](/zh/docs/concepts/configuration/pod-overhead/)。

### SecurityContextDeny {#securitycontextdeny}

<!--
This admission controller will deny any pod that attempts to set certain escalating [SecurityContext](/docs/user-guide/security-context) fields. This should be enabled if a cluster doesn't utilize [pod security policies](/docs/user-guide/pod-security-policy) to restrict the set of values a security context can take.
-->
该准入控制器将拒绝任何试图设置特定提升 [SecurityContext](/docs/user-guide/security-context) 字段的 pod。
如果集群没有使用 [pod 安全策略](/docs/user-guide/pod-security-policy)来限制安全上下文所能获取的值集,那么应该启用这个功能。
该准入控制器将拒绝任何试图设置特定提升 [SecurityContext](/zh/docs/tasks/configure-pod-container/security-context/) 字段的 pod。
如果集群没有使用 [pod 安全策略](/zh/docs/concepts/policy/pod-security-policy/)来限制安全上下文所能获取的值集,那么应该启用这个功能。

### ServiceAccount {#serviceaccount}

<!--
This admission controller implements automation for [serviceAccounts](/docs/user-guide/service-accounts).
We strongly recommend using this admission controller if you intend to make use of Kubernetes `ServiceAccount` objects.
-->
该准入控制器实现了 [serviceAccounts](/docs/user-guide/service-accounts) 的自动化。
该准入控制器实现了 [serviceAccounts](/zh/docs/tasks/configure-pod-container/configure-service-account/) 的自动化。
如果您打算使用 Kubernetes 的 ServiceAccount 对象,我们强烈建议您使用这个准入控制器。

### StorageObjectInUseProtection

<!--
The `StorageObjectInUseProtection` plugin adds the `kubernetes.io/pvc-protection` or `kubernetes.io/pv-protection` finalizers to newly created Persistent Volume Claims (PVCs) or Persistent Volumes (PV). In case a user deletes a PVC or PV the PVC or PV is not removed until the finalizer is removed from the PVC or PV by PVC or PV Protection Controller. Refer to the [Storage Object in Use Protection](/docs/concepts/storage/persistent-volumes/#storage-object-in-use-protection) for more detailed information.
-->
`StorageObjectInUseProtection` 插件将 `kubernetes.io/pvc-protection` 或 `kubernetes.io/pv-protection` finalizers 添加到新创建的持久化卷声明(PVC)或持久化卷(PV)中。 如果用户尝试删除 PVC/PV,除非 PVC/PV 的保护控制器移除 finalizers,否则 PVC/PV 不会被删除。有关更多详细信息,请参考[保护使用中的存储对象](/docs/concepts/storage/persistent-volumes/#storage-object-in-use-protection)。
`StorageObjectInUseProtection` 插件将 `kubernetes.io/pvc-protection` 或 `kubernetes.io/pv-protection` finalizers 添加到新创建的持久化卷声明(PVC)或持久化卷(PV)中。 如果用户尝试删除 PVC/PV,除非 PVC/PV 的保护控制器移除 finalizers,否则 PVC/PV 不会被删除。有关更多详细信息,请参考[保护使用中的存储对象](/zh/docs/concepts/storage/persistent-volumes/#storage-object-in-use-protection)。

### TaintNodesByCondition {#taintnodesbycondition} {{< feature-state for_k8s_version="v1.12" state="beta" >}}

Expand Down Expand Up @@ -1179,7 +1179,7 @@ Yes. For Kubernetes version 1.10 and later, the recommended admission controller
-->
## 有推荐的准入控制器吗?

有,对于 Kubernetes 1.10 以上的版本,推荐使用的准入控制器默认情况下都处于启用状态(查看[这里](/docs/reference/command-line-tools-reference/kube-apiserver/#options))。
有,对于 Kubernetes 1.10 以上的版本,推荐使用的准入控制器默认情况下都处于启用状态(查看[这里](/zh/docs/reference/command-line-tools-reference/kube-apiserver/#options))。
因此您无需显式指定它们。您可以使用 `--enable-admission-plugins` 标志( **顺序不重要** )来启用默认设置以外的其他准入控制器。

{{< note >}}
Expand Down Expand Up @@ -1217,5 +1217,3 @@ in the mutating phase.
admission controllers ran in the exact order specified.
-->
对于更早期版本,没有验证和变更的概念,并且准入控制器按照指定的确切顺序运行。


13 changes: 6 additions & 7 deletions content/zh/docs/reference/access-authn-authz/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ for more details about this.
使用证书中的 'subject' 的通用名称(Common Name)字段(例如,"/CN=bob")来
确定用户名。接下来,基于角色访问控制(RBAC)子系统会确定用户是否有权针对
某资源执行特定的操作。进一步的细节可参阅
[证书请求](/zh/docs/reference/access-authn-authz/certificate-signing-requests/#normal-user)
[证书请求](/docs/reference/access-authn-authz/certificate-signing-requests/#normal-user)
下普通用户主题。

<!--
Expand Down Expand Up @@ -387,7 +387,7 @@ mounted into pods at well-known locations, and allow in-cluster processes to
talk to the API server. Accounts may be explicitly associated with pods using the
`serviceAccountName` field of a `PodSpec`.
-->
服务账号通常由 API 服务器自动创建并通过 `ServiceAccount`
服务账号通常由 API 服务器自动创建并通过 `ServiceAccount`
[准入控制器](/zh/docs/reference/access-authn-authz/admission-controllers/)
关联到集群中运行的 Pod 上。
持有者令牌会挂载到 Pod 中可预知的为之,允许集群内进程与 API 服务器通信。
Expand Down Expand Up @@ -550,7 +550,7 @@ from the OAuth2 [token response](https://openid.net/specs/openid-connect-core-1_
as a bearer token. See [above](#putting-a-bearer-token-in-a-request) for how the token
is included in a request.
-->
要识别用户,身份认证组件使用 OAuth2
要识别用户,身份认证组件使用 OAuth2
[令牌响应](https://openid.net/specs/openid-connect-core-1_0.html#TokenResponse)
中的 `id_token`(而非 `access_token`)作为持有者令牌。
关于如何在请求中设置令牌,可参见[前文](#putting-a-bearer-token-in-a-request)。
Expand Down Expand Up @@ -654,7 +654,7 @@ Kubernetes does not provide an OpenID Connect Identity Provider.
You can use an existing public OpenID Connect Identity Provider (such as Google, or
[others](https://connect2id.com/products/nimbus-oauth-openid-connect-sdk/openid-connect-providers)).
Or, you can run your own Identity Provider, such as CoreOS [dex](https://github.com/coreos/dex),
[Keycloak](https://github.com/keycloak/keycloak),
[Keycloak](https://github.com/keycloak/keycloak),
CloudFoundry [UAA](https://github.com/cloudfoundry/uaa), or
Tremolo Security's [OpenUnison](https://github.com/tremolosecurity/openunison).
-->
Expand Down Expand Up @@ -814,7 +814,7 @@ The configuration file uses the [kubeconfig](/docs/concepts/configuration/organi
file format. Within the file, `clusters` refers to the remote service and
`users` refers to the API server webhook. An example would be:
-->
配置文件使用 [kubeconfig](/docs/concepts/configuration/organize-cluster-access-kubeconfig/)
配置文件使用 [kubeconfig](/zh/docs/concepts/configuration/organize-cluster-access-kubeconfig/)
文件的格式。文件中,`clusters` 指代远程服务,`users` 指代远程 API 服务
Webhook。下面是一个例子:

Expand Down Expand Up @@ -1455,7 +1455,7 @@ Relative command paths are interpreted as relative to the directory of the confi
KUBECONFIG is set to `/home/jane/kubeconfig` and the exec command is `./bin/example-client-go-exec-plugin`,
the binary `/home/jane/bin/example-client-go-exec-plugin` is executed.
-->
解析相对命令路径时,kubectl 将其视为与配置文件比较而言的相对路径。
解析相对命令路径时,kubectl 将其视为与配置文件比较而言的相对路径。
如果 KUBECONFIG 被设置为 `/home/jane/kubeconfig`,而 exec 命令为
`./bin/example-client-go-exec-plugin`,则要执行的可执行文件为
`/home/jane/bin/example-client-go-exec-plugin`
Expand Down Expand Up @@ -1561,4 +1561,3 @@ RFC3339 timestamp. Presence or absence of an expiry has the following impact:
}
}
```

Loading

0 comments on commit a854254

Please sign in to comment.