1
1
---
2
- title : Client Authentication (v1beta1)
2
+ title : 客户端身份认证( Client Authentication) (v1beta1)
3
3
content_type : tool-reference
4
4
package : client.authentication.k8s.io/v1beta1
5
5
auto_generated : true
6
6
---
7
7
8
+ <!--
9
+ title: Client Authentication (v1beta1)
10
+ content_type: tool-reference
11
+ package: client.authentication.k8s.io/v1beta1
12
+ auto_generated: true
13
+ -->
14
+
8
15
16
+ <!--
9
17
## Resource Types
18
+ -->
19
+ ## 资源类型 {#resource-types}
10
20
11
21
12
22
- [ ExecCredential] ( #client-authentication-k8s-io-v1beta1-ExecCredential )
@@ -20,11 +30,14 @@ auto_generated: true
20
30
21
31
22
32
33
+ <!--
23
34
ExecCredential is used by exec-based plugins to communicate credentials to
24
35
HTTP transports.
36
+ -->
37
+ ExecCredential 由基于 exec 的插件使用,与 HTTP 传输组件沟通凭据信息。
25
38
26
39
<table class =" table " >
27
- <thead ><tr ><th width =" 30% " >Field</th ><th >Description</th ></tr ></thead >
40
+ <thead ><tr ><th width =" 30% " ><!-- Field--> 字段 </th ><th ><!-- Description--> 描述 </th ></tr ></thead >
28
41
<tbody >
29
42
30
43
<tr ><td ><code >apiVersion</code ><br />string</td ><td ><code >client.authentication.k8s.io/v1beta1</code ></td ></tr >
@@ -33,20 +46,24 @@ HTTP transports.
33
46
34
47
35
48
36
- <tr ><td ><code >spec</code > <B >[Required]</B ><br />
49
+ <tr ><td ><code >spec</code > <B ><!-- [Required] --> [必需 ]</B ><br />
37
50
<a href =" #client-authentication-k8s-io-v1beta1-ExecCredentialSpec " ><code >ExecCredentialSpec</code ></a >
38
51
</td >
39
52
<td >
40
- Spec holds information passed to the plugin by the transport.</td >
53
+ <!-- Spec holds information passed to the plugin by the transport.-->
54
+ 字段 spec 包含由 HTTP 传输组件传递给插件的信息。
55
+ </td >
41
56
</tr >
42
57
43
58
44
59
<tr ><td ><code >status</code ><br />
45
60
<a href =" #client-authentication-k8s-io-v1beta1-ExecCredentialStatus " ><code >ExecCredentialStatus</code ></a >
46
61
</td >
47
62
<td >
48
- Status is filled in by the plugin and holds the credentials that the transport
49
- should use to contact the API.</td >
63
+ <!-- Status is filled in by the plugin and holds the credentials that the transport
64
+ should use to contact the API.-->
65
+ 字段 status 由插件填充,包含传输组件与 API 服务器连接时需要提供的凭据。
66
+ </td >
50
67
</tr >
51
68
52
69
@@ -60,95 +77,135 @@ should use to contact the API.</td>
60
77
61
78
62
79
63
- ** Appears in:**
80
+ <!-- **Appears in:**-->
81
+ ** 出现在:**
64
82
65
83
- [ ExecCredentialSpec] ( #client-authentication-k8s-io-v1beta1-ExecCredentialSpec )
66
84
67
85
86
+ <!--
68
87
Cluster contains information to allow an exec plugin to communicate
69
88
with the kubernetes cluster being authenticated to.
70
89
71
90
To ensure that this struct contains everything someone would need to communicate
72
91
with a kubernetes cluster (just like they would via a kubeconfig), the fields
73
92
should shadow "k8s.io/client-go/tools/clientcmd/api/v1".Cluster, with the exception
74
93
of CertificateAuthority, since CA data will always be passed to the plugin as bytes.
94
+ -->
95
+ Cluster 中包含允许 exec 插件与 Kubernetes 集群进行通信身份认证时所需
96
+ 的信息。
97
+
98
+ 为了确保该结构体包含需要与 Kubernetes 集群进行通信的所有内容(就像通过 Kubeconfig 一样),
99
+ 该字段应该映射到 "k8s.io/client-go/tools/clientcmd/api/v1".cluster,
100
+ 除了证书授权之外,由于 CA 数据将始终以字节形式传递给插件。
75
101
76
102
<table class =" table " >
77
- <thead ><tr ><th width =" 30% " >Field</th ><th >Description</th ></tr ></thead >
103
+ <thead ><tr ><th width =" 30% " ><!-- Field--> 字段 </th ><th ><!-- Description--> 描述 </th ></tr ></thead >
78
104
<tbody >
79
105
80
106
81
107
82
- <tr ><td ><code >server</code > <B >[Required]</B ><br />
108
+ <tr ><td ><code >server</code > <B ><!-- [Required] --> [必需 ]</B ><br />
83
109
<code >string</code >
84
110
</td >
85
111
<td >
86
- Server is the address of the kubernetes cluster (https://hostname:port ).</td >
112
+ <!-- Server is the address of the kubernetes cluster (https://hostname:port).-->
113
+ 字段 server 是 Kubernetes 集群的地址(https://hostname:port)。
114
+ </td >
87
115
</tr >
88
116
89
117
90
118
<tr ><td ><code >tls-server-name</code ><br />
91
119
<code >string</code >
92
120
</td >
93
121
<td >
122
+ <!--
94
123
TLSServerName is passed to the server for SNI and is used in the client to
95
124
check server certificates against. If ServerName is empty, the hostname
96
- used to contact the server is used.</td >
125
+ used to contact the server is used.
126
+ -->
127
+ tls-server-name 是用来提供给服务器用作 SNI 解析的,客户端以此检查服务器的证书。
128
+ 如此字段为空,则使用链接服务器时使用的主机名。
129
+ </td >
97
130
</tr >
98
131
99
132
100
133
<tr ><td ><code >insecure-skip-tls-verify</code ><br />
101
134
<code >bool</code >
102
135
</td >
103
136
<td >
137
+ <!--
104
138
InsecureSkipTLSVerify skips the validity check for the server's certificate.
105
- This will make your HTTPS connections insecure.</td >
139
+ This will make your HTTPS connections insecure.
140
+ -->
141
+ 设置此字段之后,会令客户端跳过对服务器端证书的合法性检查。
142
+ 这会使得你的 HTTPS 链接不再安全。
143
+ </td >
106
144
</tr >
107
145
108
146
109
147
<tr ><td ><code >certificate-authority-data</code ><br />
110
148
<code >[ ] byte</code >
111
149
</td >
112
150
<td >
151
+ <!--
113
152
CAData contains PEM-encoded certificate authority certificates.
114
- If empty, system roots should be used.</td >
153
+ If empty, system roots should be used.
154
+ -->
155
+ 此字段包含 PEM 编码的证书机构(CA)证书。
156
+ 如果为空,则使用系统的根证书。
157
+ </td >
115
158
</tr >
116
159
117
160
118
161
<tr ><td ><code >proxy-url</code ><br />
119
162
<code >string</code >
120
163
</td >
121
164
<td >
122
- ProxyURL is the URL to the proxy to be used for all requests to this
123
- cluster.</td >
165
+ <!-- ProxyURL is the URL to the proxy to be used for all requests to this cluster.-->
166
+ 此字段用来设置向集群发送所有请求时要使用的代理服务器。
167
+ </td >
124
168
</tr >
125
169
126
170
127
171
<tr ><td ><code >config</code ><br />
128
172
<a href =" https://godoc.org/k8s.io/apimachinery/pkg/runtime/#RawExtension " ><code >k8s.io/apimachinery/pkg/runtime.RawExtension</code ></a >
129
173
</td >
130
174
<td >
175
+ <!--
131
176
Config holds additional config data that is specific to the exec
132
177
plugin with regards to the cluster being authenticated to.
133
178
134
179
This data is sourced from the clientcmd Cluster object's
135
- extensions[ client.authentication.k8s.io/exec] field:
136
-
180
+ extensions[client.authentication.k8s.io/exec] field:
181
+ -->
182
+ <p >此字段包含一些额外的、特定于 exec 插件和所连接的集群的数据,</p >
183
+ <p >此字段来自于 clientcmd 集群对象的 <code >extensions[client.authentication.k8s.io/exec]</code >
184
+ 字段:</p >
185
+ <pre >
137
186
clusters:
138
187
- name: my-cluster
139
188
cluster:
140
189
...
141
190
extensions:
142
- - name: client.authentication.k8s.io/exec # reserved extension name for per cluster exec config
191
+ - name: client.authentication.k8s.io/exec # 针对每个集群 exec 配置所预留的扩展名称
143
192
extension:
144
- audience: 06e3fbd18de8 # arbitrary config
145
-
193
+ audience: 06e3fbd18de8 # 任意配置信息
194
+ </pre >
195
+ <!--
146
196
In some environments, the user config may be exactly the same across many clusters
147
197
(i.e. call this exec plugin) minus some details that are specific to each cluster
148
198
such as the audience. This field allows the per cluster config to be directly
149
199
specified with the cluster info. Using this field to store secret data is not
150
200
recommended as one of the prime benefits of exec plugins is that no secrets need
151
- to be stored directly in the kubeconfig.</td >
201
+ to be stored directly in the kubeconfig.
202
+ -->
203
+ <p >在某些环境中,用户配置可能对很多集群而言都完全一样(即调用同一个 exec 插件),
204
+ 只是针对不同集群会有一些细节上的差异,例如 audience。
205
+ 此字段使得特定于集群的配置可以直接使用集群信息来设置。
206
+ 不建议使用此字段来保存 Secret 数据,因为 exec 插件的主要优势之一是不需要在
207
+ kubeconfig 中保存 Secret 数据。</p >
208
+ </td >
152
209
</tr >
153
210
154
211
@@ -162,16 +219,20 @@ to be stored directly in the kubeconfig.</td>
162
219
163
220
164
221
165
- ** Appears in:**
222
+ <!-- **Appears in:** -->
223
+ ** 出现在:**
166
224
167
225
- [ ExecCredential] ( #client-authentication-k8s-io-v1beta1-ExecCredential )
168
226
169
227
228
+ <!--
170
229
ExecCredentialSpec holds request and runtime specific information provided by
171
- the transport.
230
+ the transport.
231
+ -->
232
+ ExecCredentialSpec 保存传输组件所提供的特定于请求和运行时的信息。
172
233
173
234
<table class =" table " >
174
- <thead ><tr ><th width =" 30% " >Field</th ><th >Description</th ></tr ></thead >
235
+ <thead ><tr ><th width =" 30% " ><!-- Field--> 字段 </th ><th ><!-- Description--> 描述 </th ></tr ></thead >
175
236
<tbody >
176
237
177
238
@@ -180,10 +241,16 @@ the transport.
180
241
<a href =" #client-authentication-k8s-io-v1beta1-Cluster " ><code >Cluster</code ></a >
181
242
</td >
182
243
<td >
244
+ <!--
183
245
Cluster contains information to allow an exec plugin to communicate with the
184
246
kubernetes cluster being authenticated to. Note that Cluster is non-nil only
185
247
when provideClusterInfo is set to true in the exec provider config (i.e.,
186
- ExecConfig.ProvideClusterInfo).</td >
248
+ ExecConfig.ProvideClusterInfo).
249
+ -->
250
+ 此字段中包含的信息使得 exec 插件能够与要访问的 Kubernetes 集群通信。
251
+ 注意,cluster 字段只有在 exec 驱动的配置中 provideClusterInfo
252
+ (即:ExecConfig.ProvideClusterInfo)被设置为 true 时才不能为空。
253
+ </td >
187
254
</tr >
188
255
189
256
@@ -197,52 +264,67 @@ ExecConfig.ProvideClusterInfo).</td>
197
264
198
265
199
266
200
- ** Appears in:**
267
+ <!-- **Appears in:** -->
268
+ ** 出现在:**
201
269
202
270
- [ ExecCredential] ( #client-authentication-k8s-io-v1beta1-ExecCredential )
203
271
204
272
273
+ <!--
205
274
ExecCredentialStatus holds credentials for the transport to use.
206
275
207
276
Token and ClientKeyData are sensitive fields. This data should only be
208
277
transmitted in-memory between client and exec plugin process. Exec plugin
209
278
itself should at least be protected via file permissions.
279
+ -->
280
+ <p >ExecCredentialStatus 中包含传输组件要使用的凭据。</p >
281
+
282
+ <p >字段 token 和 clientKeyData 都是敏感字段。
283
+ 此数据只能在客户端与 exec 插件进程之间使用内存来传递。
284
+ exec 插件本身至少应通过文件访问许可来实施保护。</p >
210
285
211
286
<table class =" table " >
212
- <thead ><tr ><th width =" 30% " >Field</th ><th >Description</th ></tr ></thead >
213
- <tbody >
287
+ <thead ><tr ><th width =" 30% " ><!-- Field--> 字段</th ><th ><!-- Description--> 描述</th ></tr ></thead >
214
288
215
289
216
290
217
291
<tr ><td ><code >expirationTimestamp</code ><br />
218
292
<a href =" https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#time-v1-meta " ><code >meta/v1.Time</code ></a >
219
293
</td >
220
294
<td >
221
- ExpirationTimestamp indicates a time when the provided credentials expire.</td >
295
+ <!-- ExpirationTimestamp indicates a time when the provided credentials expire. -->
296
+ 给出所提供的凭据到期的时间。
297
+ </td >
222
298
</tr >
223
299
224
300
225
- <tr ><td ><code >token</code > <B >[Required]</B ><br />
301
+ <tr ><td ><code >token</code > <B ><!-- [Required] --> [必需 ]</B ><br />
226
302
<code >string</code >
227
303
</td >
228
304
<td >
229
- Token is a bearer token used by the client for request authentication.</td >
305
+ <!-- Token is a bearer token used by the client for request authentication. -->
306
+ 客户端用做请求身份认证的持有者令牌。
307
+ </td >
230
308
</tr >
231
309
232
310
233
- <tr ><td ><code >clientCertificateData</code > <B >[Required]</B ><br />
311
+ <tr ><td ><code >clientCertificateData</code > <B ><!-- [Required] --> [必需 ]</B ><br />
234
312
<code >string</code >
235
313
</td >
236
314
<td >
237
- PEM-encoded client TLS certificates (including intermediates, if any).</td >
315
+ <!-- PEM-encoded client TLS certificates (including intermediates, if any). -->
316
+ PEM 编码的客户端 TLS 证书(如果有临时证书,也会包含)。
317
+ </td >
238
318
</tr >
239
319
240
320
241
- <tr ><td ><code >clientKeyData</code > <B >[Required]</B ><br />
321
+ <tr ><td ><code >clientKeyData</code > <B ><!-- [Required] --> [必需 ]</B ><br />
242
322
<code >string</code >
243
323
</td >
244
324
<td >
245
- PEM-encoded private key for the above certificate.</td >
325
+ <!-- PEM-encoded private key for the above certificate. -->
326
+ 与上述证书对应的、PEM 编码的私钥。
327
+ </td >
246
328
</tr >
247
329
248
330
0 commit comments