@@ -321,12 +321,15 @@ Credentials can be provided in several ways:
321
321
## 使用私有仓库 {#using-a-private-registry}
322
322
323
323
从私有仓库读取镜像时可能需要密钥。
324
- 凭证可以用以下方式提供 :
324
+ 凭据可以用以下方式提供 :
325
325
326
326
<!--
327
327
- Configuring Nodes to Authenticate to a Private Registry
328
328
- all pods can read any configured private registries
329
329
- requires node configuration by cluster administrator
330
+ - Kubelet Credential Provider to dynamically fetch credentials for private registries
331
+ - kubelet can be configured to use credential provider exec plugin
332
+ for the respective private registry.
330
333
- Pre-pulled Images
331
334
- all pods can use any images cached on a node
332
335
- requires root access to all nodes to set up
@@ -340,6 +343,8 @@ Credentials can be provided in several ways:
340
343
- 配置节点向私有仓库进行身份验证
341
344
- 所有 Pod 均可读取任何已配置的私有仓库
342
345
- 需要集群管理员配置节点
346
+ - kubelet 凭据提供程序,动态获取私有仓库的凭据
347
+ - kubelet 可以被配置为使用凭据提供程序 exec 插件来访问对应的私有镜像库
343
348
- 预拉镜像
344
349
- 所有 Pod 都可以使用节点上缓存的所有镜像
345
350
- 需要所有节点的 root 访问权限才能进行设置
@@ -370,7 +375,27 @@ task. That example uses a private registry in Docker Hub.
370
375
-->
371
376
有关配置私有容器镜像仓库的示例,
372
377
请参阅任务[ 从私有镜像库中拉取镜像] ( /zh-cn/docs/tasks/configure-pod-container/pull-image-private-registry ) 。
373
- 该示例使用 Docker Hub 中的私有注册表。
378
+ 该示例使用 Docker Hub 中的私有镜像仓库。
379
+
380
+ {{< note >}}
381
+ <!--
382
+ This approach is especially suitable when kubelet needs to fetch registry credentials dynamically.
383
+ Most commonly used for registries provided by cloud providers where auth tokens are short-lived.
384
+ -->
385
+ 此方法尤其适合 kubelet 需要动态获取仓库凭据时。
386
+ 最常用于由云提供商提供的仓库,其中身份认证令牌的生命期是短暂的。
387
+ {{< /note >}}
388
+
389
+ <!--
390
+ You can configure the kubelet to invoke a plugin binary to dynamically fetch registry credentials for a container image.
391
+ This is the most robust and versatile way to fetch credentials for private registries, but also requires kubelet-level configuration to enable.
392
+
393
+ See [Configure a kubelet image credential provider](/docs/tasks/administer-cluster/kubelet-credential-provider/) for more details.
394
+ -->
395
+ 你可以配置 kubelet,以调用插件可执行文件的方式来动态获取容器镜像的仓库凭据。
396
+ 这是为私有仓库获取凭据最稳健和最通用的方法,但也需要 kubelet 级别的配置才能启用。
397
+
398
+ 有关更多细节请参见[ 配置 kubelet 镜像凭据提供程序] ( /docs/tasks/administer-cluster/kubelet-credential-provider/ ) 。
374
399
375
400
<!--
376
401
### Interpretation of config.json {#config-json}
@@ -459,7 +484,7 @@ would match successfully:
459
484
The kubelet performs image pulls sequentially for every found credential. This
460
485
means, that multiple entries in `config.json` are possible, too:
461
486
-->
462
- kubelet 为每个找到的凭证的镜像按顺序拉取 。这意味着在 ` config.json ` 中可能有多项:
487
+ kubelet 为每个找到的凭据的镜像按顺序拉取 。这意味着在 ` config.json ` 中可能有多项:
463
488
464
489
``` json
465
490
{
0 commit comments