Skip to content

Commit 46ba002

Browse files
authored
Merge pull request #23000 from haircommander/fix-crio-docs
Fix CRI-O installation information
2 parents 52c1f12 + ed4506c commit 46ba002

File tree

1 file changed

+82
-40
lines changed

1 file changed

+82
-40
lines changed

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

Lines changed: 82 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -221,71 +221,113 @@ sysctl --system
221221
{{< tabs name="tab-cri-cri-o-installation" >}}
222222
{{% tab name="Debian" %}}
223223

224-
```shell
225-
# Debian Unstable/Sid
226-
echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_Unstable/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
227-
wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/Debian_Unstable/Release.key -O- | sudo apt-key add -
228-
```
224+
To install CRI-O on the following operating systems, set the environment variable $OS to the appropriate field in the following table:
229225

230-
```shell
231-
# Debian Testing
232-
echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_Testing/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
233-
wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/Debian_Testing/Release.key -O- | sudo apt-key add -
234-
```
226+
| Operating system | $OS |
227+
| ---------------- | ----------------- |
228+
| Debian Unstable | `Debian_Unstable` |
229+
| Debian Testing | `Debian_Testing` |
235230

236-
```shell
237-
# Debian 10
238-
echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
239-
wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/Debian_10/Release.key -O- | sudo apt-key add -
240-
```
231+
<br />
232+
Then, set `$VERSION` to the CRI-O version that matches your Kubernetes version.
233+
For instance, if you want to install CRI-O 1.18, set `VERSION=1.18`.
234+
You can pin your installation to a specific release.
235+
To install version 1.18.3, set `VERSION=1.18:1.18.3`.
236+
<br />
241237

238+
Then run
242239
```shell
243-
# Raspbian 10
244-
echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Raspbian_10/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
245-
wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/Raspbian_10/Release.key -O- | sudo apt-key add -
246-
```
240+
echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/ /" > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
241+
echo "deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$VERSION/$OS/ /" > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:$VERSION.list
247242

248-
and then install CRI-O:
249-
```shell
250-
sudo apt-get install cri-o-1.17
243+
curl -L https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:$VERSION/$OS/Release.key | apt-key add -
244+
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/Release.key | apt-key add -
245+
246+
apt-get update
247+
apt-get install cri-o cri-o-runc
251248
```
249+
252250
{{% /tab %}}
253251

254-
{{% tab name="Ubuntu 18.04, 19.04 and 19.10" %}}
252+
{{% tab name="Ubuntu" %}}
255253

256-
```shell
257-
# Configure package repository
258-
. /etc/os-release
259-
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/x${NAME}_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
260-
wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/x${NAME}_${VERSION_ID}/Release.key -O- | sudo apt-key add -
261-
sudo apt-get update
262-
```
254+
To install on the following operating systems, set the environment variable $OS to the appropriate field in the following table:
263255

256+
| Operating system | $OS |
257+
| ---------------- | ----------------- |
258+
| Ubuntu 20.04 | `xUbuntu_20.04` |
259+
| Ubuntu 19.10 | `xUbuntu_19.10` |
260+
| Ubuntu 19.04 | `xUbuntu_19.04` |
261+
| Ubuntu 18.04 | `xUbuntu_18.04` |
262+
263+
<br />
264+
Then, set `$VERSION` to the CRI-O version that matches your Kubernetes version.
265+
For instance, if you want to install CRI-O 1.18, set `VERSION=1.18`.
266+
You can pin your installation to a specific release.
267+
To install version 1.18.3, set `VERSION=1.18:1.18.3`.
268+
<br />
269+
270+
Then run
264271
```shell
265-
# Install CRI-O
266-
sudo apt-get install cri-o-1.17
272+
echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/ /" > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
273+
echo "deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$VERSION/$OS/ /" > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:$VERSION.list
274+
275+
curl -L https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:$VERSION/$OS/Release.key | apt-key add -
276+
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/Release.key | apt-key add -
277+
278+
apt-get update
279+
apt-get install cri-o cri-o-runc
267280
```
268281
{{% /tab %}}
269282

270-
{{% tab name="CentOS/RHEL 7.4+" %}}
283+
{{% tab name="CentOS" %}}
271284

272-
```shell
273-
# Install prerequisites
274-
curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/CentOS_7/devel:kubic:libcontainers:stable.repo
275-
curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable:cri-o:{{< skew latestVersion >}}.repo https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:{{< skew latestVersion >}}/CentOS_7/devel:kubic:libcontainers:stable:cri-o:{{< skew latestVersion >}}.repo
276-
```
285+
To install on the following operating systems, set the environment variable $OS to the appropriate field in the following table:
277286

287+
| Operating system | $OS |
288+
| ---------------- | ----------------- |
289+
| Centos 8 | `CentOS_8` |
290+
| Centos 8 Stream | `CentOS_8_Stream` |
291+
| Centos 7 | `CentOS_7` |
292+
293+
<br />
294+
Then, set `$VERSION` to the CRI-O version that matches your Kubernetes version.
295+
For instance, if you want to install CRI-O 1.18, set `VERSION=1.18`.
296+
You can pin your installation to a specific release.
297+
To install version 1.18.3, set `VERSION=1.18:1.18.3`.
298+
<br />
299+
300+
Then run
278301
```shell
279-
# Install CRI-O
280-
yum install -y cri-o
302+
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
303+
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
304+
yum install cri-o
281305
```
306+
282307
{{% /tab %}}
283308

284309
{{% tab name="openSUSE Tumbleweed" %}}
285310

286311
```shell
287312
sudo zypper install cri-o
288313
```
314+
{{% /tab %}}
315+
{{% tab name="Fedora" %}}
316+
317+
Set `$VERSION` to the CRI-O version that matches your Kubernetes version.
318+
For instance, if you want to install CRI-O 1.18, `VERSION=1.18`
319+
You can find available versions with:
320+
```shell
321+
dnf module list cri-o
322+
```
323+
CRI-O does not support pinning to specific releases on Fedora.
324+
325+
Then run
326+
```shell
327+
dnf module enable cri-o:$VERSION
328+
dnf install cri-o
329+
```
330+
289331
{{% /tab %}}
290332
{{< /tabs >}}
291333

0 commit comments

Comments
 (0)