diff --git a/content/zh/docs/reference/config-api/client-authentication.v1.md b/content/zh/docs/reference/config-api/client-authentication.v1.md index e3b919b9c4..b1cf6a708b 100644 --- a/content/zh/docs/reference/config-api/client-authentication.v1.md +++ b/content/zh/docs/reference/config-api/client-authentication.v1.md @@ -76,6 +76,10 @@ of CertificateAuthority, since CA data will always be passed to the plugin as by Cluster 中包含允许 exec 插件与 Kubernetes 集群进行通信身份认证时所需 的信息。 +为了确保该结构体包含需要与 Kubernetes 集群进行通信的所有内容(就像通过 Kubeconfig 一样), +除了证书授权之外,该字段应该映射到 "k8s.io/client-go/tools/clientcmd/api/v1".cluster, +由于 CA 数据将始终以字节形式传递给插件。 +
| 字段 | 描述 |
|---|
| 字段 | 描述 |
|---|
| Field | Description |
|---|---|
| 字段 | 描述 |
apiVersionstring | client.authentication.k8s.io/v1beta1 |
spec [Required]+ | |
spec [必需]ExecCredentialSpec
|
- Spec holds information passed to the plugin by the transport. | + + 字段 spec 包含由 HTTP 传输组件传递给插件的信息。 +- Status is filled in by the plugin and holds the credentials that the transport -should use to contact the API. | + + 字段 status 由插件填充,包含传输组件与 API 服务器连接时需要提供的凭据。 + @@ -60,11 +77,13 @@ should use to contact the API. -**Appears in:** + +**出现在:** - [ExecCredentialSpec](#client-authentication-k8s-io-v1beta1-ExecCredentialSpec) + +Cluster 中包含允许 exec 插件与 Kubernetes 集群进行通信身份认证时所需 +的信息。 + +为了确保该结构体包含需要与 Kubernetes 集群进行通信的所有内容(就像通过 Kubeconfig 一样), +该字段应该映射到 "k8s.io/client-go/tools/clientcmd/api/v1".cluster, +除了证书授权之外,由于 CA 数据将始终以字节形式传递给插件。
| Field | Description |
|---|---|
| 字段 | 描述 |
server [Required]+ | |
server [必需]string
|
- Server is the address of the kubernetes cluster (https://hostname:port). | + + 字段 server 是 Kubernetes 集群的地址(https://hostname:port)。 ++ + tls-server-name 是用来提供给服务器用作 SNI 解析的,客户端以此检查服务器的证书。 + 如此字段为空,则使用链接服务器时使用的主机名。 + | @@ -101,8 +134,13 @@ used to contact the server is used.+ + 设置此字段之后,会令客户端跳过对服务器端证书的合法性检查。 + 这会使得你的 HTTPS 链接不再安全。 + | @@ -110,8 +148,13 @@ This will make your HTTPS connections insecure.+ + 此字段包含 PEM 编码的证书机构(CA)证书。 + 如果为空,则使用系统的根证书。 + | @@ -119,8 +162,9 @@ If empty, system roots should be used.- ProxyURL is the URL to the proxy to be used for all requests to this -cluster. | + + 此字段用来设置向集群发送所有请求时要使用的代理服务器。 + @@ -128,27 +172,40 @@ cluster.
+
+ 此字段包含一些额外的、特定于 exec 插件和所连接的集群的数据, +此字段来自于 clientcmd 集群对象的
clusters:
- name: my-cluster
cluster:
...
extensions:
- - name: client.authentication.k8s.io/exec # reserved extension name for per cluster exec config
+ - name: client.authentication.k8s.io/exec # 针对每个集群 exec 配置所预留的扩展名称
extension:
- audience: 06e3fbd18de8 # arbitrary config
-
+ audience: 06e3fbd18de8 # 任意配置信息
+
+
+在某些环境中,用户配置可能对很多集群而言都完全一样(即调用同一个 exec 插件), +只是针对不同集群会有一些细节上的差异,例如 audience。 +此字段使得特定于集群的配置可以直接使用集群信息来设置。 +不建议使用此字段来保存 Secret 数据,因为 exec 插件的主要优势之一是不需要在 +kubeconfig 中保存 Secret 数据。 + |
@@ -162,16 +219,20 @@ to be stored directly in the kubeconfig.
-**Appears in:**
+
+**出现在:**
- [ExecCredential](#client-authentication-k8s-io-v1beta1-ExecCredential)
+
+ExecCredentialSpec 保存传输组件所提供的特定于请求和运行时的信息。
| Field | Description |
|---|---|
| 字段 | 描述 | + + 此字段中包含的信息使得 exec 插件能够与要访问的 Kubernetes 集群通信。 + 注意,cluster 字段只有在 exec 驱动的配置中 provideClusterInfo + (即:ExecConfig.ProvideClusterInfo)被设置为 true 时才不能为空。 + | @@ -197,20 +264,27 @@ ExecConfig.ProvideClusterInfo). -**Appears in:** + +**出现在:** - [ExecCredential](#client-authentication-k8s-io-v1beta1-ExecCredential) + +
| Field | Description |
|---|---|
| 字段 | 描述 | - ExpirationTimestamp indicates a time when the provided credentials expire. | + + 给出所提供的凭据到期的时间。 + -
token [Required]+ | |
token [必需]string
|
- Token is a bearer token used by the client for request authentication. | + + 客户端用做请求身份认证的持有者令牌。 +
clientCertificateData [Required]+ | |
clientCertificateData [必需]string
|
- PEM-encoded client TLS certificates (including intermediates, if any). | + + PEM 编码的客户端 TLS 证书(如果有临时证书,也会包含)。 +
clientKeyData [Required]+ | |
clientKeyData [必需]string
|
- PEM-encoded private key for the above certificate. | + + 与上述证书对应的、PEM 编码的私钥。 +