Skip to content

Commit c7e5985

Browse files
authored
Merge pull request #23468 from zhangguanzhang/update-zh-container-runtimes
[zh] fix and update setup/production-environment/container-runtimes.md
2 parents c0d06c1 + 91b8a10 commit c7e5985

File tree

1 file changed

+86
-20
lines changed

1 file changed

+86
-20
lines changed

content/zh/docs/setup/production-environment/container-runtimes.md

Lines changed: 86 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ A flaw was found in the way runc handled system file descriptors when running co
3535
A malicious container could use this flaw to overwrite contents of the runc binary and
3636
consequently run arbitrary commands on the container host system.
3737
38-
Please refer to this link for more information about this issue
39-
[cve-2019-5736 : runc vulnerability ] (https://access.redhat.com/security/cve/cve-2019-5736)
38+
Please refer to [CVE-2019-5736](https://access.redhat.com/security/cve/cve-2019-5736) for more
39+
information about the issue.
4040
-->
4141
我们发现 runc 在运行容器,处理系统文件描述符时存在一个漏洞。
4242
恶意容器可以利用此漏洞覆盖 runc 二进制文件的内容,并以此在主机系统的容器上运行任意的命令。
4343

44-
请参考此链接以获取有关此问题的更多信息 [cve-2019-5736 : runc vulnerability ](https://access.redhat.com/security/cve/cve-2019-5736)
44+
请参考此链接以获取有关此问题的更多信息 [cve-2019-5736: runc vulnerability](https://access.redhat.com/security/cve/cve-2019-5736)
4545
{{< /caution >}}
4646

4747
<!--
@@ -120,15 +120,15 @@ is to drain the Node from its workloads, remove it from the cluster and re-join
120120
## Docker
121121
122122
On each of your machines, install Docker.
123-
Version 19.03.4 is recommended, but 1.13.1, 17.03, 17.06, 17.09, 18.06 and 18.09 are known to work as well.
123+
Version 19.03.11 is recommended, but 1.13.1, 17.03, 17.06, 17.09, 18.06 and 18.09 are known to work as well.
124124
Keep track of the latest verified Docker version in the Kubernetes release notes.
125125
126126
Use the following commands to install Docker on your system:
127127
-->
128128
## Docker
129129

130130
在您的每台机器上安装 Docker。
131-
推荐安装 19.03.4 版本,但是 1.13.1、17.03、17.06、17.09、18.06 和 18.09 版本也是可以的。
131+
推荐安装 19.03.11 版本,但是 1.13.1、17.03、17.06、17.09、18.06 和 18.09 版本也是可以的。
132132
请跟踪 Kubernetes 发行说明中经过验证的 Docker 最新版本变化。
133133

134134
使用以下命令在您的系统上安装 Docker:
@@ -244,10 +244,10 @@ yum-config-manager \
244244
https://download.docker.com/linux/centos/docker-ce.repo
245245
246246
## Install Docker CE.
247-
yum update && yum install \
248-
containerd.io-1.2.10 \
249-
docker-ce-19.03.4 \
250-
docker-ce-cli-19.03.4
247+
yum update -y && yum install -y \
248+
containerd.io-1.2.13 \
249+
docker-ce-19.03.11 \
250+
docker-ce-cli-19.03.11
251251
252252
## Create /etc/docker directory.
253253
mkdir /etc/docker
@@ -285,7 +285,10 @@ yum-config-manager \
285285

286286
```shell
287287
## 安装 Docker CE.
288-
yum update && yum install docker-ce-18.06.2.ce
288+
yum update -y && yum install -y \
289+
containerd.io-1.2.13 \
290+
docker-ce-19.03.11 \
291+
docker-ce-cli-19.03.11
289292
```
290293

291294
```shell
@@ -525,24 +528,52 @@ apt-get update
525528
apt-get install cri-o-1.15
526529
```
527530
{{% /tab %}}
528-
{{% tab name="CentOS/RHEL 7.4+" codelang="bash" %}}
531+
{{% tab name="CentOS" %}}
529532

530533
<!--
531-
# Install prerequisites
532-
yum-config-manager --add-repo=https://cbs.centos.org/repos/paas7-crio-115-release/x86_64/os/
534+
To install on the following operating systems, set the environment variable $OS to the appropriate field in the following table:
533535
534-
# Install CRI-O
535-
yum install --nogpgcheck cri-o
536-
-->
536+
| Operating system | $OS |
537+
| ---------------- | ----------------- |
538+
| Centos 8 | `CentOS_8` |
539+
| Centos 8 Stream | `CentOS_8_Stream` |
540+
| Centos 7 | `CentOS_7` |
541+
542+
<br />
543+
Then, set `$VERSION` to the CRI-O version that matches your Kubernetes version.
544+
For instance, if you want to install CRI-O 1.18, set `VERSION=1.18`.
545+
You can pin your installation to a specific release.
546+
To install version 1.18.3, set `VERSION=1.18:1.18.3`.
547+
<br />
537548
549+
Then run
538550
```shell
539-
# 安装必备软件
540-
yum-config-manager --add-repo=https://cbs.centos.org/repos/paas7-crio-115-release/x86_64/os/
551+
curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/devel:kubic:libcontainers:stable.repo
552+
curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable:cri-o:$VERSION.repo https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:$VERSION/$OS/devel:kubic:libcontainers:stable:cri-o:$VERSION.repo
553+
yum install cri-o
541554
```
555+
-->
556+
557+
要在以下操作系统上安装,请将环境变量 `$OS` 设置为下表中的相应字段:
558+
559+
| 操作系统 | $OS |
560+
| ---------------- | ----------------- |
561+
| Centos 8 | `CentOS_8` |
562+
| Centos 8 Stream | `CentOS_8_Stream` |
563+
| Centos 7 | `CentOS_7` |
564+
565+
<br />
566+
然后将 `$VERSION` 设置为与你的 Kubernetes 相匹配的 CRI-O 版本。
567+
例如,如果要安装 CRI-O 1.18,请设置 `VERSION=1.18`
568+
你也可以安装特定版本,例如 1.18.3,请设置 `VERSION=1.18:1.18.3`
569+
<br />
570+
571+
确保声明变量后,使用下面命令安装
542572

543573
```shell
544-
# 安装 CRI-O
545-
yum install --nogpgcheck cri-o
574+
curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/devel:kubic:libcontainers:stable.repo
575+
curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable:cri-o:$VERSION.repo https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:$VERSION/$OS/devel:kubic:libcontainers:stable:cri-o:$VERSION.repo
576+
yum install cri-o
546577
```
547578

548579
{{% /tab %}}
@@ -552,8 +583,43 @@ yum install --nogpgcheck cri-o
552583
```shell
553584
sudo zypper install cri-o
554585
```
586+
555587
{{% /tab %}}
556588

589+
{{% tab name="Fedora" %}}
590+
<!--
591+
Set `$VERSION` to the CRI-O version that matches your Kubernetes version.
592+
For instance, if you want to install CRI-O 1.18, `VERSION=1.18`
593+
You can find available versions with:
594+
```shell
595+
dnf module list cri-o
596+
```
597+
CRI-O does not support pinning to specific releases on Fedora.
598+
599+
Then run
600+
```shell
601+
dnf module enable cri-o:$VERSION
602+
dnf install cri-o
603+
```
604+
-->
605+
606+
`$VERSION` 设置为与你的 Kubernetes 相匹配的 CRI-O 版本。
607+
例如,如果要安装 CRI-O 1.18,请设置 `VERSION=1.18`
608+
你可以用下列命令查找可用的版本:
609+
610+
```shell
611+
dnf module list cri-o
612+
```
613+
614+
CRI-O 不支持在 Fedora 上固定到特定的版本。
615+
运行下列命令安装
616+
617+
```shell
618+
dnf module enable cri-o:$VERSION
619+
dnf install cri-o
620+
```
621+
622+
{{% /tab %}}
557623
{{< /tabs >}}
558624

559625
<!--

0 commit comments

Comments
 (0)