Skip to content

Commit 0f0e87a

Browse files
author
Tim Bannister
committed
Revise “Container runtimes” getting started guide
- Reword page introduction. - Match headings to contents; before, headings were sometimes followed first by unrelated text and then, with no clear divider, text that did not relate to the heading. - Remove Fracti link (not in line with content guide).
1 parent e028d3d commit 0f0e87a

File tree

1 file changed

+59
-59
lines changed

1 file changed

+59
-59
lines changed

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

Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -7,62 +7,64 @@ content_type: concept
77
weight: 10
88
---
99
<!-- overview -->
10-
{{< feature-state for_k8s_version="v1.6" state="stable" >}}
11-
To run containers in Pods, Kubernetes uses a container runtime. Here are
12-
the installation instructions for various runtimes.
13-
1410

11+
You need to install a
12+
{{< glossary_tooltip text="container runtime" term_id="container-runtime" >}}
13+
into each node in the cluster so that Pods can run there. This page outlines
14+
what is involved and describes related tasks for setting up nodes.
1515

1616
<!-- body -->
1717

18+
This page lists details for using several common container runtimes with
19+
Kubernetes, on Linux:
1820

19-
{{< caution >}}
20-
A flaw was found in the way runc handled system file descriptors when running containers.
21-
A malicious container could use this flaw to overwrite contents of the runc binary and
22-
consequently run arbitrary commands on the container host system.
23-
24-
Please refer to [CVE-2019-5736](https://access.redhat.com/security/cve/cve-2019-5736) for more
25-
information about the issue.
26-
{{< /caution >}}
27-
28-
### Applicability
21+
- [Docker](#docker)
22+
- [CRI-O](#cri-o)
23+
- [containerd](#containerd)
2924

3025
{{< note >}}
31-
This document is written for users installing CRI onto Linux. For other operating
32-
systems, look for documentation specific to your platform.
26+
For other operating systems, look for documentation specific to your platform.
3327
{{< /note >}}
3428

35-
### Cgroup drivers
36-
37-
When systemd is chosen as the init system for a Linux distribution, the init process generates
38-
and consumes a root control group (`cgroup`) and acts as a cgroup manager. Systemd has a tight
39-
integration with cgroups and will allocate cgroups per process. It's possible to configure your
40-
container runtime and the kubelet to use `cgroupfs`. Using `cgroupfs` alongside systemd means
41-
that there will be two different cgroup managers.
29+
## Cgroup drivers
4230

4331
Control groups are used to constrain resources that are allocated to processes.
44-
A single cgroup manager will simplify the view of what resources are being allocated
45-
and will by default have a more consistent view of the available and in-use resources. When we have
46-
two managers we end up with two views of those resources. We have seen cases in the field
47-
where nodes that are configured to use `cgroupfs` for the kubelet and Docker, and `systemd`
48-
for the rest of the processes running on the node becomes unstable under resource pressure.
32+
33+
When [systemd](https://www.freedesktop.org/wiki/Software/systemd/) is chosen as the init
34+
system for a Linux distribution, the init process generates and consumes a root control group
35+
(`cgroup`) and acts as a cgroup manager.
36+
Systemd has a tight integration with cgroups and allocates a cgroup per systemd unit. It's possible
37+
to configure your container runtime and the kubelet to use `cgroupfs`. Using `cgroupfs` alongside
38+
systemd means that there will be two different cgroup managers.
39+
40+
A single cgroup manager simplifies the view of what resources are being allocated
41+
and will by default have a more consistent view of the available and in-use resources.
42+
When there are two cgroup managers on a system, you end up with two views of those resources.
43+
In the field, people have reported cases where nodes that are configured to use `cgroupfs`
44+
for the kubelet and Docker, but `systemd` for the rest of the processes, become unstable under
45+
resource pressure.
4946

5047
Changing the settings such that your container runtime and kubelet use `systemd` as the cgroup driver
51-
stabilized the system. Please note the `native.cgroupdriver=systemd` option in the Docker setup below.
48+
stabilized the system. To configure this for Docker, set `native.cgroupdriver=systemd`.
5249

5350
{{< caution >}}
54-
Changing the cgroup driver of a Node that has joined a cluster is highly unrecommended.
51+
Changing the cgroup driver of a Node that has joined a cluster is strongly *not* recommended.
5552
If the kubelet has created Pods using the semantics of one cgroup driver, changing the container
56-
runtime to another cgroup driver can cause errors when trying to re-create the PodSandbox
57-
for such existing Pods. Restarting the kubelet may not solve such errors. The recommendation
58-
is to drain the Node from its workloads, remove it from the cluster and re-join it.
53+
runtime to another cgroup driver can cause errors when trying to re-create the Pod sandbox
54+
for such existing Pods. Restarting the kubelet may not solve such errors.
55+
56+
If you have automation that makes it feasible, replace the node with another using the updated
57+
configuration, or reinstall it using automation.
5958
{{< /caution >}}
6059

61-
## Docker
60+
## Container runtimes
61+
62+
### Docker
6263

63-
On each of your machines, install Docker.
64-
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.
65-
Keep track of the latest verified Docker version in the Kubernetes release notes.
64+
On each of your nodes, install Docker CE.
65+
66+
The Kubernetes release notes list which versions of Docker are compatible
67+
with that version of Kubernetes.
6668

6769
Use the following commands to install Docker on your system:
6870

@@ -179,7 +181,7 @@ sudo systemctl restart docker
179181
{{% /tab %}}
180182
{{< /tabs >}}
181183

182-
If you want the docker service to start on boot, run the following command:
184+
If you want the `docker` service to start on boot, run the following command:
183185

184186
```shell
185187
sudo systemctl enable docker
@@ -188,9 +190,9 @@ sudo systemctl enable docker
188190
Refer to the [official Docker installation guides](https://docs.docker.com/engine/installation/)
189191
for more information.
190192

191-
## CRI-O
193+
### CRI-O
192194

193-
This section contains the necessary steps to install `CRI-O` as CRI runtime.
195+
This section contains the necessary steps to install CRI-O as a container runtime.
194196

195197
Use the following commands to install CRI-O on your system:
196198

@@ -199,7 +201,7 @@ The CRI-O major and minor versions must match the Kubernetes major and minor ver
199201
For more information, see the [CRI-O compatibility matrix](https://github.com/cri-o/cri-o).
200202
{{< /note >}}
201203

202-
### Prerequisites
204+
Install and configure prerequisites:
203205

204206
```shell
205207
sudo modprobe overlay
@@ -218,9 +220,10 @@ sudo sysctl --system
218220
{{< tabs name="tab-cri-cri-o-installation" >}}
219221
{{% tab name="Debian" %}}
220222

221-
To install CRI-O on the following operating systems, set the environment variable $OS to the appropriate field in the following table:
223+
To install CRI-O on the following operating systems, set the environment variable `OS`
224+
to the appropriate value from the following table:
222225

223-
| Operating system | $OS |
226+
| Operating system | `$OS` |
224227
| ---------------- | ----------------- |
225228
| Debian Unstable | `Debian_Unstable` |
226229
| Debian Testing | `Debian_Testing` |
@@ -252,9 +255,9 @@ sudo apt-get install cri-o cri-o-runc
252255

253256
{{% tab name="Ubuntu" %}}
254257

255-
To install on the following operating systems, set the environment variable $OS to the appropriate field in the following table:
258+
To install on the following operating systems, set the environment variable `OS` to the appropriate field in the following table:
256259

257-
| Operating system | $OS |
260+
| Operating system | `$OS` |
258261
| ---------------- | ----------------- |
259262
| Ubuntu 20.04 | `xUbuntu_20.04` |
260263
| Ubuntu 19.10 | `xUbuntu_19.10` |
@@ -283,9 +286,9 @@ sudo apt-get install cri-o cri-o-runc
283286

284287
{{% tab name="CentOS" %}}
285288

286-
To install on the following operating systems, set the environment variable $OS to the appropriate field in the following table:
289+
To install on the following operating systems, set the environment variable `OS` to the appropriate field in the following table:
287290

288-
| Operating system | $OS |
291+
| Operating system | `$OS` |
289292
| ---------------- | ----------------- |
290293
| Centos 8 | `CentOS_8` |
291294
| Centos 8 Stream | `CentOS_8_Stream` |
@@ -316,7 +319,8 @@ sudo zypper install cri-o
316319
{{% tab name="Fedora" %}}
317320

318321
Set `$VERSION` to the CRI-O version that matches your Kubernetes version.
319-
For instance, if you want to install CRI-O 1.18, `VERSION=1.18`
322+
For instance, if you want to install CRI-O 1.18, `VERSION=1.18`.
323+
320324
You can find available versions with:
321325
```shell
322326
sudo dnf module list cri-o
@@ -332,7 +336,7 @@ sudo dnf install cri-o
332336
{{% /tab %}}
333337
{{< /tabs >}}
334338

335-
### Start CRI-O
339+
Start CRI-O:
336340

337341
```shell
338342
sudo systemctl daemon-reload
@@ -342,13 +346,13 @@ sudo systemctl start crio
342346
Refer to the [CRI-O installation guide](https://github.com/kubernetes-sigs/cri-o#getting-started)
343347
for more information.
344348

345-
## Containerd
349+
### containerd
346350

347351
This section contains the necessary steps to use `containerd` as CRI runtime.
348352

349353
Use the following commands to install Containerd on your system:
350354

351-
### Prerequisites
355+
Install and configure prerequisites:
352356

353357
```shell
354358
cat <<EOF | sudo tee /etc/modules-load.d/containerd.conf
@@ -369,7 +373,7 @@ EOF
369373
sudo sysctl --system
370374
```
371375

372-
### Install containerd
376+
Install containerd:
373377

374378
{{< tabs name="tab-cri-containerd-installation" >}}
375379
{{% tab name="Ubuntu 16.04" %}}
@@ -470,7 +474,7 @@ Start-Service containerd
470474
{{% /tab %}}
471475
{{< /tabs >}}
472476

473-
### systemd
477+
#### systemd
474478

475479
To use the `systemd` cgroup driver in `/etc/containerd/config.toml` with `runc` set
476480

@@ -480,11 +484,7 @@ To use the `systemd` cgroup driver in `/etc/containerd/config.toml` with `runc`
480484
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
481485
SystemdCgroup = true
482486
```
483-
When using kubeadm, manually configure the
484-
[cgroup driver for kubelet](/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#configure-cgroup-driver-used-by-kubelet-on-control-plane-node)
485-
486-
## Other CRI runtimes: frakti
487-
488-
Refer to the [Frakti QuickStart guide](https://github.com/kubernetes/frakti#quickstart) for more information.
489487

488+
When using kubeadm, manually configure the
489+
[cgroup driver for kubelet](/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#configure-cgroup-driver-used-by-kubelet-on-control-plane-node).
490490

0 commit comments

Comments
 (0)