Skip to content

Commit ac717e9

Browse files
authored
Merge pull request #41226 from mrgiles/37108_container_runtime_cgroupdriver_refs
Add references to kubelet kubeadm and cgroupDriver
2 parents 7adc5e3 + c208c1b commit ac717e9

File tree

1 file changed

+26
-17
lines changed

1 file changed

+26
-17
lines changed

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

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,16 @@ If you are running a version of Kubernetes other than v{{< skew currentVersion >
4444
check the documentation for that version.
4545
{{< /note >}}
4646

47-
4847
<!-- body -->
4948
## Install and configure prerequisites
5049

51-
The following steps apply common settings for Kubernetes nodes on Linux.
50+
The following steps apply common settings for Kubernetes nodes on Linux.
5251

5352
You can skip a particular setting if you're certain you don't need it.
5453

55-
For more information, see [Network Plugin Requirements](/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/#network-plugin-requirements) or the documentation for your specific container runtime.
54+
For more information, see
55+
[Network Plugin Requirements](/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/#network-plugin-requirements)
56+
or the documentation for your specific container runtime.
5657

5758
### Forwarding IPv4 and letting iptables see bridged traffic
5859

@@ -78,29 +79,31 @@ EOF
7879
sudo sysctl --system
7980
```
8081

81-
Verify that the `br_netfilter`, `overlay` modules are loaded by running below instructions:
82+
Verify that the `br_netfilter`, `overlay` modules are loaded by running the following commands:
8283

8384
```bash
8485
lsmod | grep br_netfilter
8586
lsmod | grep overlay
8687
```
8788

88-
Verify that the `net.bridge.bridge-nf-call-iptables`, `net.bridge.bridge-nf-call-ip6tables`, `net.ipv4.ip_forward` system variables are set to 1 in your `sysctl` config by running below instruction:
89+
Verify that the `net.bridge.bridge-nf-call-iptables`, `net.bridge.bridge-nf-call-ip6tables`, and
90+
`net.ipv4.ip_forward` system variables are set to `1` in your `sysctl` config by running the following command:
91+
8992
```bash
9093
sysctl net.bridge.bridge-nf-call-iptables net.bridge.bridge-nf-call-ip6tables net.ipv4.ip_forward
9194
```
9295

93-
## Cgroup drivers
96+
## cgroup drivers
9497

9598
On Linux, {{< glossary_tooltip text="control groups" term_id="cgroup" >}}
9699
are used to constrain resources that are allocated to processes.
97100

98-
Both {{< glossary_tooltip text="kubelet" term_id="kubelet" >}} and the
101+
Both the {{< glossary_tooltip text="kubelet" term_id="kubelet" >}} and the
99102
underlying container runtime need to interface with control groups to enforce
100-
[resource management for pods and containers](/docs/concepts/configuration/manage-resources-containers/) and set
101-
resources such as cpu/memory requests and limits. To interface with control
103+
[resource management for pods and containers](/docs/concepts/configuration/manage-resources-containers/)
104+
and set resources such as cpu/memory requests and limits. To interface with control
102105
groups, the kubelet and the container runtime need to use a *cgroup driver*.
103-
It's critical that the kubelet and the container runtime uses the same cgroup
106+
It's critical that the kubelet and the container runtime use the same cgroup
104107
driver and are configured the same.
105108

106109
There are two cgroup drivers available:
@@ -110,16 +113,15 @@ There are two cgroup drivers available:
110113

111114
### cgroupfs driver {#cgroupfs-cgroup-driver}
112115

113-
The `cgroupfs` driver is the default cgroup driver in the kubelet. When the `cgroupfs`
114-
driver is used, the kubelet and the container runtime directly interface with
115-
the cgroup filesystem to configure cgroups.
116+
The `cgroupfs` driver is the [default cgroup driver in the kubelet](docs/reference/config-api/kubelet-config.v1beta1).
117+
When the `cgroupfs` driver is used, the kubelet and the container runtime directly interface with
118+
the cgroup filesystem to configure cgroups.
116119

117120
The `cgroupfs` driver is **not** recommended when
118121
[systemd](https://www.freedesktop.org/wiki/Software/systemd/) is the
119122
init system because systemd expects a single cgroup manager on
120-
the system. Additionally, if you use [cgroup v2](/docs/concepts/architecture/cgroups)
121-
, use the `systemd` cgroup driver instead of
122-
`cgroupfs`.
123+
the system. Additionally, if you use [cgroup v2](/docs/concepts/architecture/cgroups), use the `systemd`
124+
cgroup driver instead of `cgroupfs`.
123125

124126
### systemd cgroup driver {#systemd-cgroup-driver}
125127

@@ -150,6 +152,11 @@ kind: KubeletConfiguration
150152
cgroupDriver: systemd
151153
```
152154
155+
{{< note >}}
156+
Starting with v1.22 and later, when creating a cluster with kubeadm, if the user does not set
157+
the `cgroupDriver` field under `KubeletConfiguration`, kubeadm defaults it to `systemd`.
158+
{{< /note >}}
159+
153160
If you configure `systemd` as the cgroup driver for the kubelet, you must also
154161
configure `systemd` as the cgroup driver for the container runtime. Refer to
155162
the documentation for your container runtime for instructions. For example:
@@ -190,7 +197,9 @@ using the (deprecated) v1alpha2 API instead.
190197

191198
This section outlines the necessary steps to use containerd as CRI runtime.
192199

193-
To install containerd on your system, follow the instructions on [getting started with containerd](https://github.com/containerd/containerd/blob/main/docs/getting-started.md).Return to this step once you've created a valid `config.toml` configuration file.
200+
To install containerd on your system, follow the instructions on
201+
[getting started with containerd](https://github.com/containerd/containerd/blob/main/docs/getting-started.md).
202+
Return to this step once you've created a valid `config.toml` configuration file.
194203

195204
{{< tabs name="Finding your config.toml file" >}}
196205
{{% tab name="Linux" %}}

0 commit comments

Comments
 (0)