1
1
---
2
- title : Kubelet 配置 (v1alpha1)
2
+ title : kubelet 配置 (v1alpha1)
3
3
content_type : tool-reference
4
4
package : kubelet.config.k8s.io/v1alpha1
5
5
---
@@ -26,15 +26,15 @@ each exec credential provider. Kubelet reads this configuration from disk and en
26
26
each provider as specified by the CredentialProvider type.
27
27
-->
28
28
CredentialProviderConfig 包含有关每个 exec 凭据提供者的配置信息。
29
- Kubelet 从磁盘上读取这些配置信息,并根据 CredentialProvider 类型启用各个提供者。
29
+ kubelet 从磁盘上读取这些配置信息,并根据 CredentialProvider 类型启用各个提供者。
30
30
31
31
<table class =" table " >
32
32
<thead ><tr ><th width =" 30% " ><!-- Field--> 字段</th ><th ><!-- Description--> 描述</th ></tr ></thead >
33
33
<tbody >
34
34
35
35
<tr ><td ><code >apiVersion</code ><br />string</td ><td ><code >kubelet.config.k8s.io/v1alpha1</code ></td ></tr >
36
36
<tr ><td ><code >kind</code ><br />string</td ><td ><code >CredentialProviderConfig</code ></td ></tr >
37
- <tr ><td ><code >providers</code > <B >[必需]</B ><br />
37
+ <tr ><td ><code >providers</code > <B ><!-- [Required] --> [必需]</B ><br />
38
38
<a href =" #kubelet-config-k8s-io-v1alpha1-CredentialProvider " ><code >[ ] CredentialProvider</code ></a >
39
39
</td >
40
40
<td >
@@ -66,10 +66,10 @@ ImagePullIntent 是 kubelet 尝试拉取镜像的记录。
66
66
<table class =" table " >
67
67
<thead ><tr ><th width =" 30% " ><!-- Field--> 字段</th ><th ><!-- Description--> 描述</th ></tr ></thead >
68
68
<tbody >
69
-
69
+
70
70
<tr ><td ><code >apiVersion</code ><br />string</td ><td ><code >kubelet.config.k8s.io/v1alpha1</code ></td ></tr >
71
71
<tr ><td ><code >kind</code ><br />string</td ><td ><code >ImagePullIntent</code ></td ></tr >
72
-
72
+
73
73
<tr ><td ><code >image</code > <B ><!-- [Required]--> [必需]</B ><br />
74
74
<code >string</code >
75
75
</td >
@@ -109,7 +109,7 @@ image represented by this record is being requested.
109
109
<table class =" table " >
110
110
<thead ><tr ><th width =" 30% " ><!-- Field--> 字段</th ><th ><!-- Description--> 描述</th ></tr >
111
111
<tbody >
112
-
112
+
113
113
<tr ><td ><code >apiVersion</code ><br />string</td ><td ><code >kubelet.config.k8s.io/v1alpha1</code ></td ></tr >
114
114
<tr ><td ><code >kind</code ><br />string</td ><td ><code >ImagePulledRecord</code ></td ></tr >
115
115
@@ -194,7 +194,7 @@ CredentialProvider 代表的是要被 kubelet 调用的一个 exec 插件。
194
194
<thead ><tr ><th width =" 30% " ><!-- Field--> 字段</th ><th ><!-- Description--> 描述</th ></tr ></thead >
195
195
<tbody >
196
196
197
- <tr ><td ><code >name</code > <B >[必需]</B ><br />
197
+ <tr ><td ><code >name</code > <B ><!-- [Required] --> [必需]</B ><br />
198
198
<code >string</code >
199
199
</td >
200
200
<td >
@@ -205,29 +205,55 @@ provider executable as seen by the kubelet. The executable must be in the kubele
205
205
bin directory (set by the --image-credential-provider-bin-dir flag).
206
206
Required to be unique across all providers.
207
207
-->
208
- <code >name</code > 是凭据提供者的名称(必需)。此名称必须与 kubelet
209
- 所看到的提供者可执行文件的名称匹配。可执行文件必须位于 kubelet 的
210
- <code >bin</code > 目录(通过 <code >--image-credential-provider-bin-dir</code > 设置)下。
211
- 必须在所有提供商之间保持唯一。
212
- <p >
208
+ <code >name</code > 是凭据提供者的名称(必需)。此名称必须与 kubelet
209
+ 所看到的提供者可执行文件的名称匹配。可执行文件必须位于 kubelet 的
210
+ <code >bin</code > 目录(通过 <code >--image-credential-provider-bin-dir</code > 设置)下。
211
+ 必须在所有提供商之间保持唯一。
212
+ </ p >
213
213
</td >
214
214
</tr >
215
215
216
- <tr ><td ><code >matchImages</code > <B >[必需]</B ><br />
216
+ <tr ><td ><code >matchImages</code > <B ><!-- [Required] --> [必需]</B ><br />
217
217
<code >[ ] string</code >
218
218
</td >
219
219
<td >
220
- <!-- matchImages is a required list of strings used to match against images in order to
220
+ <p >
221
+ <!--
222
+ matchImages is a required list of strings used to match against images in order to
221
223
determine if this provider should be invoked. If one of the strings matches the
222
224
requested image from the kubelet, the plugin will be invoked and given a chance
223
225
to provide credentials. Images are expected to contain the registry domain
224
226
and URL path.
227
+ -->
228
+ <code >matchImages</code > 是一个必须设置的字符串列表,用来匹配镜像以便确定是否要调用此提供者。
229
+ 如果字符串之一与 kubelet 所请求的镜像匹配,则此插件会被调用并给予提供凭证的机会。
230
+ 镜像应该包含镜像库域名和 URL 路径。
231
+ </p >
232
+ <p >
233
+ <!--
225
234
Each entry in matchImages is a pattern which can optionally contain a port and a path.
226
235
Globs can be used in the domain, but not in the port or the path. Globs are supported
227
236
as subdomains like <code>*.k8s.io</code> or <code>k8s.*.io</code>, and top-level-domains such as <code>k8s.*</code>.
237
+ -->
238
+ <code >matchImages</code > 中的每个条目都是一个模式字符串,其中可以包含端口号和路径。
239
+ 域名部分可以包含统配符,但端口或路径部分不可以。通配符可以用作子域名,例如
240
+ <code >* .k8s.io</code > 或 <code >k8s.* .io</code >,以及 <code >k8s.* </code > 这类顶级域名。
241
+ </p >
242
+ <p >
243
+ <!--
228
244
Matching partial subdomains like <code>app*.k8s.io</code> is also supported. Each glob can only match
229
245
a single subdomain segment, so <code>*.io</code> does not match <code>*.k8s.io</code>.
246
+ -->
247
+ 对类似 <code >app* .k8s.io</code > 这类部分子域名的匹配也是支持的。
248
+ 每个通配符只能用来匹配一个子域名段,所以 <code >* .io</code > 不会匹配 <code >* .k8s.io</code >。
249
+ </p >
250
+ <p >
251
+ <!--
230
252
A match exists between an image and a matchImage when all of the below are true:
253
+ -->
254
+ 镜像与 <code >matchImages</code > 之间存在匹配时,以下条件都要满足:
255
+ </p >
256
+ <!--
231
257
<ul>
232
258
<li>Both contain the same number of domain parts and each part matches.</li>
233
259
<li>The URL path of an imageMatch must be a prefix of the target image URL path.</li>
@@ -239,16 +265,7 @@ Example values of matchImages:
239
265
- gcr.io
240
266
- ∗.∗.registry.io
241
267
- registry.io:8080/path
242
- -->
243
- <p ><code >matchImages</code > 是一个必须设置的字符串列表,用来匹配镜像以便确定是否要调用此提供者。
244
- 如果字符串之一与 kubelet 所请求的镜像匹配,则此插件会被调用并给予提供凭证的机会。
245
- 镜像应该包含镜像库域名和 URL 路径。</p >
246
- <p ><code >matchImages</code > 中的每个条目都是一个模式字符串,其中可以包含端口号和路径。
247
- 域名部分可以包含统配符,但端口或路径部分不可以。通配符可以用作子域名,例如
248
- <code >* .k8s.io</code > 或 <code >k8s.* .io</code >,以及顶级域名,如 <code >k8s.* </code >。</p >
249
- <p >对类似 <code >app*.k8s.io</code > 这类部分子域名的匹配也是支持的。
250
- 每个通配符只能用来匹配一个子域名段,所以 <code >* .io</code > 不会匹配 <code >* .k8s.io</code >。</p >
251
- <p >镜像与 <code >matchImages</code > 之间存在匹配时,以下条件都要满足:</p >
268
+ -->
252
269
<ul >
253
270
<li >二者均包含相同个数的域名部分,并且每个域名部分都对应匹配;</li >
254
271
<li ><code >matchImages</code > 条目中的 URL 路径部分必须是目标镜像的 URL 路径的前缀;</li >
@@ -265,26 +282,32 @@ Example values of matchImages:
265
282
</td >
266
283
</tr >
267
284
268
- <tr ><td ><code >defaultCacheDuration</code > <B >[必需]</B ><br />
285
+ <tr ><td ><code >defaultCacheDuration</code > <B ><!-- [Required] --> [必需]</B ><br />
269
286
<a href =" https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration " ><code >meta/v1.Duration</code ></a >
270
287
</td >
271
288
<td >
272
- <!-- defaultCacheDuration is the default duration the plugin will cache credentials in-memory
273
- if a cache duration is not provided in the plugin response. This field is required.-->
289
+ <!--
290
+ defaultCacheDuration is the default duration the plugin will cache credentials in-memory
291
+ if a cache duration is not provided in the plugin response. This field is required.
292
+ -->
274
293
<code >defaultCacheDuration</code > 是插件在内存中缓存凭据的默认时长,
275
294
在插件响应中没有给出缓存时长时,使用这里设置的值。此字段是必需的。
276
295
</td >
277
296
</tr >
278
297
279
- <tr ><td ><code >apiVersion</code > <B >[必需]</B ><br />
298
+ <tr ><td ><code >apiVersion</code > <B ><!-- [Required] --> [必需]</B ><br />
280
299
<code >string</code >
281
300
</td >
282
301
<td >
283
- <!-- Required input version of the exec CredentialProviderRequest. The returned CredentialProviderResponse
302
+ <p >
303
+ <!--
304
+ Required input version of the exec CredentialProviderRequest. The returned CredentialProviderResponse
284
305
MUST use the same encoding version as the input. Current supported values are:
285
- - credentialprovider.kubelet.k8s.io/v1alpha1-->
286
- <p >要求 exec 插件 CredentialProviderRequest 请求的输入版本。
287
- 所返回的 CredentialProviderResponse 必须使用与输入相同的编码版本。当前支持的值有:</p >
306
+ - credentialprovider.kubelet.k8s.io/v1alpha1
307
+ -->
308
+ 要求 exec 插件 CredentialProviderRequest 请求的输入版本。
309
+ 所返回的 CredentialProviderResponse 必须使用与输入相同的编码版本。当前支持的值有:
310
+ </p >
288
311
<ul >
289
312
<li><code>credentialprovider.kubelet.k8s.io/v1alpha1</code></li>
290
313
</ul >
@@ -295,19 +318,23 @@ MUST use the same encoding version as the input. Current supported values are:
295
318
<code >[ ] string</code >
296
319
</td >
297
320
<td >
298
- <!-- Arguments to pass to the command when executing it.-->
299
- 在执行插件可执行文件时要传递给命令的参数。
321
+ <!--
322
+ Arguments to pass to the command when executing it.
323
+ -->
324
+ 在执行插件可执行文件时要传递给命令的参数。
300
325
</td >
301
326
</tr >
302
327
303
328
<tr ><td ><code >env</code ><br />
304
329
<a href =" #kubelet-config-k8s-io-v1alpha1-ExecEnvVar " ><code >[ ] ExecEnvVar</code ></a >
305
330
</td >
306
331
<td >
307
- <!-- Env defines additional environment variables to expose to the process. These
332
+ <!--
333
+ Env defines additional environment variables to expose to the process. These
308
334
are unioned with the host's environment, as well as variables client-go uses
309
- to pass argument to the plugin.-->
310
- <code >env</code > 定义要提供给插件进程的额外的环境变量。
335
+ to pass argument to the plugin.
336
+ -->
337
+ <code >env</code > 定义要提供给插件进程的额外的环境变量。
311
338
这些环境变量会与主机上的其他环境变量以及 client-go 所使用的环境变量组合起来,
312
339
一起传递给插件。
313
340
</td >
@@ -334,7 +361,7 @@ ExecEnvVar 用来在执行基于 exec 的凭据插件时设置环境变量。
334
361
<thead ><tr ><th width =" 30% " ><!-- Field--> 字段</th ><th ><!-- Description--> 描述</th ></tr ></thead >
335
362
<tbody >
336
363
337
- <tr ><td ><code >name</code > <B >[必需]</B ><br />
364
+ <tr ><td ><code >name</code > <B ><!-- [Required] --> [必需]</B ><br />
338
365
<code >string</code >
339
366
</td >
340
367
<td >
@@ -343,7 +370,7 @@ ExecEnvVar 用来在执行基于 exec 的凭据插件时设置环境变量。
343
370
</td >
344
371
</tr >
345
372
346
- <tr ><td ><code >value</code > <B >[必需]</B ><br />
373
+ <tr ><td ><code >value</code > <B ><!-- [Required] --> [必需]</B ><br />
347
374
<code >string</code >
348
375
</td >
349
376
<td >
@@ -355,28 +382,25 @@ ExecEnvVar 用来在执行基于 exec 的凭据插件时设置环境变量。
355
382
</table >
356
383
357
384
## ` ImagePullCredentials ` {#kubelet-config-k8s-io-v1alpha1-ImagePullCredentials}
358
-
385
+
359
386
<!--
360
387
**Appears in:**
361
388
-->
362
389
** 出现在:**
363
390
364
391
- [ ImagePulledRecord] ( #kubelet-config-k8s-io-v1alpha1-ImagePulledRecord )
365
392
366
-
367
393
<p >
368
394
<!--
369
395
ImagePullCredentials describe credentials that can be used to pull an image.
370
396
-->
371
397
ImagePullCredentials 描述了可以用于拉取镜像的凭据。
372
398
</p >
373
399
374
-
375
400
<table class =" table " >
376
401
<thead ><tr ><th width =" 30% " ><!-- Field--> 字段</th ><th ><!-- Description--> 描述</th ></tr ></thead >
377
402
<tbody >
378
-
379
-
403
+
380
404
<tr ><td ><code >kubernetesSecrets</code ><br />
381
405
<a href =" #kubelet-config-k8s-io-v1alpha1-ImagePullSecret " ><code >[ ] ImagePullSecret</code ></a >
382
406
</td >
@@ -415,7 +439,7 @@ If true, it is mutually exclusive with the <code>kubernetesSecrets</code> field.
415
439
</table >
416
440
417
441
## ` ImagePullSecret ` {#kubelet-config-k8s-io-v1alpha1-ImagePullSecret}
418
-
442
+
419
443
<!--
420
444
**Appears in:**
421
445
-->
@@ -470,4 +494,3 @@ credentialHash 是通过对镜像拉取凭据的内容进行哈希计算获得
470
494
</tr >
471
495
</tbody >
472
496
</table >
473
-
0 commit comments