diff --git a/content/zh/docs/reference/config-api/client-authentication.v1.md b/content/zh/docs/reference/config-api/client-authentication.v1.md new file mode 100644 index 0000000000..e3b919b9c4 --- /dev/null +++ b/content/zh/docs/reference/config-api/client-authentication.v1.md @@ -0,0 +1,280 @@ +--- +title: 客户端身份认证(Client Authentication) (v1) +content_type: tool-reference +package: client.authentication.k8s.io/v1 +auto_generated: true +--- + + + + +## 资源类型 {#resource-types} + +- [ExecCredential](#client-authentication-k8s-io-v1-ExecCredential) + +## `ExecCredential` {#client-authentication-k8s-io-v1-ExecCredential} + + +ExecCredential 由基于 exec 的插件使用,与 HTTP 传输组件沟通凭据信息。 + + + + + + + + + + + + + + + + +
字段描述
apiVersion
string
client.authentication.k8s.io/v1
kind
string
ExecCredential
spec [必需]
+ExecCredentialSpec +
+ + 字段 spec 包含由 HTTP 传输组件传递给插件的信息。 +
status
+ExecCredentialStatus +
+ + 字段 status 由插件填充,包含传输组件与 API 服务器连接时需要提供的凭据。 +
+ +## `Cluster` {#client-authentication-k8s-io-v1-Cluster} + + +**出现在:** + +- [ExecCredentialSpec](#client-authentication-k8s-io-v1-ExecCredentialSpec) + + +Cluster 中包含允许 exec 插件与 Kubernetes 集群进行通信身份认证时所需 +的信息。 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
字段描述
server [必需]
+string +
+ + 字段 server 是 Kubernetes 集群的地址(https://hostname:port)。 +
tls-server-name
+string +
+ + tls-server-name 是用来提供给服务器用作 SNI 解析的,客户端以此检查服务器的证书。 + 如此字段为空,则使用链接服务器时使用的主机名。 +
insecure-skip-tls-verify
+bool +
+ + 设置此字段之后,会令客户端跳过对服务器端证书的合法性检查。 + 这会使得你的 HTTPS 链接不再安全。 +
certificate-authority-data
+[]byte +
+ + 此字段包含 PEM 编码的证书机构(CA)证书。 + 如果为空,则使用系统的根证书。 +
proxy-url
+string +
+ + 此字段用来设置向集群发送所有请求时要使用的代理服务器。 +
config
+k8s.io/apimachinery/pkg/runtime.RawExtension +
+ +

此字段包含一些额外的、特定于 exec 插件和所连接的集群的数据,

+

此字段来自于 clientcmd 集群对象的 extensions[client.authentication.k8s.io/exec] + 字段:

+
+clusters:
+- name: my-cluster
+  cluster:
+    ...
+    extensions:
+    - name: client.authentication.k8s.io/exec  # 针对每个集群 exec 配置所预留的扩展名称
+      extension:
+        audience: 06e3fbd18de8  # 任意配置信息
+
+ + +

在某些环境中,用户配置可能对很多集群而言都完全一样(即调用同一个 exec 插件), + 只是针对不同集群会有一些细节上的差异,例如 audience。 + 此字段使得特定于集群的配置可以直接使用集群信息来设置。 + 不建议使用此字段来保存 Secret 数据,因为 exec 插件的主要优势之一是不需要在 + kubeconfig 中保存 Secret 数据。 +

+ +## `ExecCredentialSpec` {#client-authentication-k8s-io-v1-ExecCredentialSpec} + + +**出现在:** + +- [ExecCredential](#client-authentication-k8s-io-v1-ExecCredential) + + +ExecCredentialSpec 保存传输组件所提供的特定于请求和运行时的信息。 + + + + + + + + + + + + + +
字段描述
cluster
+Cluster +
+ + 此字段中包含的信息使得 exec 插件能够与要访问的 Kubernetes 集群通信。 + 注意,cluster 字段只有在 exec 驱动的配置中 provideClusterInfo + (即:ExecConfig.ProvideClusterInfo)被设置为 true 时才不能为空。 +
interactive [必需]
+bool +
+ + 此字段用来标明标准输出信息是否已传递给 exec 插件。 +
+ +## `ExecCredentialStatus` {#client-authentication-k8s-io-v1-ExecCredentialStatus} + + + +- [ExecCredential](#client-authentication-k8s-io-v1-ExecCredential) + + +

ExecCredentialStatus 中包含传输组件要使用的凭据。

+

字段 token 和 clientKeyData 都是敏感字段。此数据只能在 +客户端与 exec 插件进程之间使用内存来传递。exec 插件本身至少 +应通过文件访问许可来实施保护。

》 + + + + + + + + + + + + + + + + + + + + +
字段描述
expirationTimestamp
+meta/v1.Time +
+ + 给出所提供的凭据到期的时间。 +
token [必需]
+string +
+ + 客户端用做请求身份认证的持有者令牌。 +
clientCertificateData [必需]
+string +
+ + PEM 编码的客户端 TLS 证书(如果有临时证书,也会包含)。 +
clientKeyData [必需]
+string +
+ + 与上述证书对应的、PEM 编码的私钥。 +
+