Skip to content

Commit cd725d0

Browse files
Merge branch 'kubernetes:main' into new_branch
2 parents 9bedc37 + 305eb5e commit cd725d0

File tree

2 files changed

+32
-33
lines changed

2 files changed

+32
-33
lines changed

content/zh-cn/docs/concepts/containers/images.md

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -145,24 +145,25 @@ so that they don't need to be downloaded again.
145145
只要能够可靠地访问镜像仓库,底层镜像提供者的缓存语义甚至可以使 `imagePullPolicy: Always` 高效。
146146
你的容器运行时可以注意到节点上已经存在的镜像层,这样就不需要再次下载。
147147

148+
{{< note >}}
148149
<!--
149150
You should avoid using the `:latest` tag when deploying containers in production as
150151
it is harder to track which version of the image is running and more difficult to
151152
roll back properly.
152153
153154
Instead, specify a meaningful tag such as `v1.42.0`.
154-
155-
To make sure the Pod always uses the same version of a container image, you can specify
156-
the image's digest;
157-
replace `<image-name>:<tag>` with `<image-name>@<digest>`
158-
(for example, `image@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2`).
159155
-->
160-
{{< note >}}
161156
在生产环境中部署容器时,你应该避免使用 `:latest` 标签,因为这使得正在运行的镜像的版本难以追踪,并且难以正确地回滚。
162157

163158
相反,应指定一个有意义的标签,如 `v1.42.0`
164159
{{< /note >}}
165160

161+
<!--
162+
To make sure the Pod always uses the same version of a container image, you can specify
163+
the image's digest;
164+
replace `<image-name>:<tag>` with `<image-name>@<digest>`
165+
(for example, `image@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2`).
166+
-->
166167
为了确保 Pod 总是使用相同版本的容器镜像,你可以指定镜像的摘要;
167168
`<image-name>:<tag>` 替换为 `<image-name>@<digest>`,例如 `image@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2`
168169

@@ -345,7 +346,7 @@ These options are explained in more detail below.
345346
346347
Specific instructions for setting credentials depends on the container runtime and registry you chose to use. You should refer to your solution's documentation for the most accurate information.
347348
-->
348-
### 配置 Node 对私有仓库认证
349+
### 配置 Node 对私有仓库认证 {configuring-nodes-to-authenticate-to-a-private-registry}
349350

350351
设置凭据的具体说明取决于你选择使用的容器运行时和仓库。
351352
你应该参考解决方案的文档来获取最准确的信息。
@@ -423,11 +424,11 @@ term:
423424
'?' 匹配任意单个非分隔符
424425
'[' [ '^' ] 字符范围
425426
字符集(必须非空)
426-
c 匹配字符 c (c 不为 '*','?','\\','[')
427+
c 匹配字符 c (c 不为 '*', '?', '\\', '[')
427428
'\\' c 匹配字符 c
428429
429430
字符范围:
430-
c 匹配字符 c (c 不为 '\\','?','-',']')
431+
c 匹配字符 c (c 不为 '\\', '?', '-', ']')
431432
'\\' c 匹配字符 c
432433
lo '-' hi 匹配字符范围在 lo 到 hi 之间字符
433434
```
@@ -483,12 +484,12 @@ authentication sources if one of them fails.
483484
-->
484485
### 提前拉取镜像 {#pre-pulled-images}
485486

487+
{{< note >}}
486488
<!--
487489
This approach is suitable if you can control node configuration. It
488490
will not work reliably if your cloud provider manages nodes and replaces
489491
them automatically.
490492
-->
491-
{{< note >}}
492493
该方法适用于你能够控制节点配置的场合。
493494
如果你的云供应商负责管理节点并自动置换节点,这一方案无法可靠地工作。
494495
{{< /note >}}
@@ -521,11 +522,11 @@ All pods will have read access to any pre-pulled images.
521522
-->
522523
### 在 Pod 上指定 ImagePullSecrets {#specifying-imagepullsecrets-on-a-pod}
523524

525+
{{< note >}}
524526
<!--
525527
This is the recommended approach to run containers based on images
526528
in private registries.
527529
-->
528-
{{< note >}}
529530
运行使用私有仓库中镜像的容器时,建议使用这种方法。
530531
{{< /note >}}
531532

@@ -574,11 +575,11 @@ only works with a single private registry.
574575
如果你在使用多个私有容器仓库,这种技术将特别有用。
575576
原因是 `kubectl create secret docker-registry` 创建的是仅适用于某个私有仓库的 Secret。
576577

578+
{{< note >}}
577579
<!--
578580
Pods can only reference image pull secrets in their own namespace,
579581
so this process needs to be done one time per namespace.
580582
-->
581-
{{< note >}}
582583
Pod 只能引用位于自身所在名字空间中的 Secret,因此需要针对每个名字空间重复执行上述过程。
583584
{{< /note >}}
584585

@@ -591,7 +592,7 @@ reference a Secret in the same namespace.
591592
592593
For example:
593594
-->
594-
#### 在 Pod 中引用 ImagePullSecrets
595+
#### 在 Pod 中引用 ImagePullSecrets {referring-to-an-imagepullsecrets-on-a-pod}
595596

596597
现在,在创建 Pod 时,可以在 Pod 定义中增加 `imagePullSecrets` 部分来引用该 Secret。
597598
`imagePullSecrets` 数组中的每一项只能引用同一名字空间中的 Secret。
@@ -620,7 +621,7 @@ EOF
620621
```
621622

622623
<!--
623-
This needs to be done for each pod that is using a private registry.
624+
This needs to be done for each pod that is using a private registry.
624625
625626
However, setting of this field can be automated by setting the imagePullSecrets
626627
in a [ServiceAccount](/docs/tasks/configure-pod-container/configure-service-account/) resource.
@@ -651,33 +652,31 @@ common use cases and suggested solutions.
651652

652653
<!--
653654
1. Cluster running only non-proprietary (e.g. open-source) images. No need to hide images.
654-
- Use public images on the Docker hub.
655+
- Use public images from a public registry
655656
- No configuration required.
656657
- Some cloud providers automatically cache or mirror public images, which improves availability and reduces the time to pull images.
657658
-->
658659
1. 集群运行非专有镜像(例如,开源镜像)。镜像不需要隐藏。
659-
- 使用 Docker hub 上的公开镜像
660+
- 使用来自公共仓库的公共镜像
660661
- 无需配置
661662
- 某些云厂商会自动为公开镜像提供高速缓存,以便提升可用性并缩短拉取镜像所需时间
662663

663664
<!--
664665
1. Cluster running some proprietary images which should be hidden to those outside the company, but
665666
visible to all cluster users.
666-
- Use a hosted private [Docker registry](https://docs.docker.com/registry/).
667-
- It may be hosted on the [Docker Hub](https://hub.docker.com/signup), or elsewhere.
668-
- Manually configure .docker/config.json on each node as described above.
667+
- Use a hosted private registry
668+
- Manual configuration may be required on the nodes that need to access to private registry
669669
- Or, run an internal private registry behind your firewall with open read access.
670670
- No Kubernetes configuration is required.
671671
- Use a hosted container image registry service that controls image access
672672
- It will work better with cluster autoscaling than manual node configuration.
673673
- Or, on a cluster where changing the node configuration is inconvenient, use `imagePullSecrets`.
674674
-->
675675
2. 集群运行一些专有镜像,这些镜像需要对公司外部隐藏,对所有集群用户可见
676-
- 使用托管的私有 [Docker 仓库](https://docs.docker.com/registry/)
677-
- 可以托管在 [Docker Hub](https://hub.docker.com/account/signup/) 或者其他地方
678-
- 按照上面的描述,在每个节点上手动配置 `.docker/config.json` 文件
676+
- 使用托管的私有仓库
677+
- 在需要访问私有仓库的节点上可能需要手动配置
679678
- 或者,在防火墙内运行一个组织内部的私有仓库,并开放读取权限
680-
- 不需要配置 Kubenretes
679+
- 不需要配置 Kubernetes
681680
- 使用控制镜像访问的托管容器镜像仓库服务
682681
- 与手动配置节点相比,这种方案能更好地处理集群自动扩缩容
683682
- 或者,在不方便更改节点配置的集群中,使用 `imagePullSecrets`

content/zh-cn/docs/tasks/administer-cluster/verify-signed-images.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ You will need to have the following tools installed:
2525
- `cosign` ([install guide](https://docs.sigstore.dev/cosign/installation/))
2626
- `curl` (often provided by your operating system)
2727
-->
28-
这些说明适用于 Kubernetes {{< skew currentVersion >}}。如果你想要检查其他版本的 Kubernetes 组件的完整性,
29-
请查看对应 Kubernetes 版本的文档。
28+
这些说明适用于 Kubernetes {{< skew currentVersion >}}。
29+
如果你想要检查其他版本的 Kubernetes 组件的完整性,请查看对应 Kubernetes 版本的文档。
3030

31-
你需要安装以下工具:
31+
你需要安装以下工具
3232

33-
- `cosign` ([安装指南](https://docs.sigstore.dev/cosign/installation/))
34-
- `curl` (通常由你的操作系统提供)
33+
- `cosign`[安装指南](https://docs.sigstore.dev/cosign/installation/)
34+
- `curl`通常由你的操作系统提供
3535

3636
<!--
3737
## Verifying image signatures
@@ -44,19 +44,19 @@ the `cosign verify` command:
4444
-->
4545
## 验证镜像签名 {#verifying-image-signatures}
4646

47-
完整的镜像签名列表请参见[发行版本](/releases/download/)
47+
完整的镜像签名列表请参见[发行版本](/zh-cn/releases/download/)
4848

49-
我们从这个列表中选择一个镜像,并使用 `cosign verify` 命令来验证它的签名:
49+
从这个列表中选择一个镜像,并使用 `cosign verify` 命令来验证它的签名:
5050

5151
```shell
52-
COSIGN_EXPERIMENTAL=1 cosign verify k8s.gcr.io/kube-apiserver-amd64:v1.24.0
52+
COSIGN_EXPERIMENTAL=1 cosign verify registry.k8s.io/kube-apiserver-amd64:v1.24.0
5353
```
5454

5555
{{< note >}}
5656
<!--
5757
`COSIGN_EXPERIMENTAL=1` is used to allow verification of images signed
5858
in `KEYLESS` mode. To learn more about keyless signing, please refer to
59-
[Keyless Signatures](https://github.com/sigstore/cosign/blob/main/KEYLESS.md#keyless-signatures)
59+
[Keyless Signatures](https://github.com/sigstore/cosign/blob/main/KEYLESS.md#keyless-signatures).
6060
-->
6161
`COSIGN_EXPERIMENTAL=1` 用于对以 `KEYLESS` 模式签名的镜像进行验证。想要进一步了解 `KEYLESS`,请参考
6262
[Keyless Signatures](https://github.com/sigstore/cosign/blob/main/KEYLESS.md#keyless-signatures)
@@ -72,7 +72,7 @@ To verify all signed control plane images, please run this command:
7272
验证所有已签名的控制平面组件镜像,请运行以下命令:
7373

7474
```shell
75-
curl -Ls https://sbom.k8s.io/$(curl -Ls https://dl.k8s.io/release/latest.txt)/release | grep 'PackageName: k8s.gcr.io/' | awk '{print $2}' > images.txt
75+
curl -Ls https://sbom.k8s.io/$(curl -Ls https://dl.k8s.io/release/latest.txt)/release | grep 'PackageName: registry.k8s.io/' | awk '{print $2}' > images.txt
7676
input=images.txt
7777
while IFS= read -r image
7878
do

0 commit comments

Comments
 (0)