Skip to content

Commit e594afb

Browse files
authored
Merge pull request #50502 from mburke5678/nodes-crun-tech-preview
OSDOCS3978: Tech preview of Crun in openshift
2 parents 4c60d07 + 5c450b5 commit e594afb

File tree

7 files changed

+72
-11
lines changed

7 files changed

+72
-11
lines changed

_topic_maps/_topic_map.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2048,7 +2048,7 @@ Topics:
20482048
- Name: Working with containers
20492049
Dir: containers
20502050
Topics:
2051-
- Name: Using containers
2051+
- Name: Understanding containers
20522052
File: nodes-containers-using
20532053
- Name: Using Init Containers to perform tasks before a pod is deployed
20542054
File: nodes-containers-init

modules/about-crio.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
[id="about-crio_{context}"]
77
= About CRI-O container runtime engine
88

9-
CRI-O is a Kubernetes-native container runtime implementation that integrates closely with the operating system to deliver an efficient and optimized Kubernetes experience. CRI-O provides facilities for running, stopping, and restarting containers.
9+
include::snippets/about-crio-snippet.adoc[]
1010

11-
The CRI-O container runtime engine is managed using a systemd service on each {product-title} cluster node. When container runtime issues occur, verify the status of the `crio` systemd service on each node. Gather CRI-O journald unit logs from nodes that manifest container runtime issues.
11+
When container runtime issues occur, verify the status of the `crio` systemd service on each node. Gather CRI-O journald unit logs from nodes that have container runtime issues.

modules/architecture-machine-roles.adoc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ The `kubelet` service must not be newer than `kube-apiserver`, and can be up to
4040
[id="defining-workers_{context}"]
4141
== Cluster workers
4242

43-
In a Kubernetes cluster, the worker nodes are where the actual workloads requested by Kubernetes users run and are managed. The worker nodes advertise their capacity and the scheduler, which is part of the master services, determines on which nodes to start containers and pods. Important services run on each worker node, including CRI-O, which is the container engine, Kubelet, which is the service that accepts and fulfills requests for running and stopping container workloads, and a service proxy, which manages communication for pods across workers.
43+
In a Kubernetes cluster, the worker nodes are where the actual workloads requested by Kubernetes users run and are managed. The worker nodes advertise their capacity and the scheduler, which a control plane service, determines on which nodes to start pods and containers. Important services run on each worker node, including CRI-O, which is the container engine; Kubelet, which is the service that accepts and fulfills requests for running and stopping container workloads; a service proxy, which manages communication for pods across workers; and the runC or crun (Technology Preview) low-level container runtime, which creates and runs containers.
44+
45+
[NOTE]
46+
====
47+
For information about how to enable crun instead of the default runC, see the documentation for creating a `ContainerRuntimeConfig` CR.
48+
====
4449

4550
In {product-title}, machine sets control the worker machines. Machines with the worker role drive compute workloads that are governed by a specific machine pool that autoscales them. Because {product-title} has the capacity to support multiple machine types, the worker machines are classed as _compute_ machines. In this release, the terms _worker machine_ and _compute machine_ are used interchangeably because the only default type of compute machine is the worker machine. In future versions of {product-title}, different types of compute machines, such as infrastructure machines, might be used by default.
4651

modules/create-a-containerruntimeconfig-crd.adoc

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ You can modify the following settings by using a `ContainerRuntimeConfig` CR:
1919
* **Log level**: The `logLevel` parameter sets the CRI-O `log_level` parameter, which is the level of verbosity for log messages. The default is `info` (`log_level = info`). Other options include `fatal`, `panic`, `error`, `warn`, `debug`, and `trace`.
2020
* **Overlay size**: The `overlaySize` parameter sets the CRI-O Overlay storage driver `size` parameter, which is the maximum size of a container image.
2121
* **Maximum log size**: The `logSizeMax` parameter sets the CRI-O `log_size_max` parameter, which is the maximum size allowed for the container log file. The default is unlimited (`log_size_max = -1`). If set to a positive number, it must be at least 8192 to not be smaller than the ConMon read buffer. ConMon is a program that
22-
monitors communications between a container manager (such as Podman or CRI-O) and the OCI runtime (such as runc or crun) for a single container.
22+
monitors communications between a container manager, such as Podman or CRI-O, and the OCI runtime, such as runC or crun, for a single container.
23+
* **Container runtime**: The `defaultRuntime` parameter sets the container runtime to either `runc` or `crun`. The default is `runc`.
24+
25+
:FeatureName: Support for the crun container runtime
26+
include::snippets/technology-preview.adoc[]
2327

2428
You should have one `ContainerRuntimeConfig` CR for each machine config pool with all the config changes you want for that pool. If you are applying the same content to all the pools, you only need one `ContainerRuntimeConfig` CR for all the pools.
2529

@@ -87,13 +91,24 @@ spec:
8791
logLevel: debug <3>
8892
overlaySize: 8G <4>
8993
logSizeMax: "-1" <5>
94+
defaultRuntime: "crun" <6>
9095
----
9196
<1> Specifies the machine config pool label.
9297
<2> Optional: Specifies the maximum number of processes allowed in a container.
9398
<3> Optional: Specifies the level of verbosity for log messages.
9499
<4> Optional: Specifies the maximum size of a container image.
95100
<5> Optional: Specifies the maximum size allowed for the container log file. If
96101
set to a positive number, it must be at least 8192.
102+
<6> Optional: Specifies the container runtime to deploy to new containers. The default is `runc`.
103+
104+
.Prerequisite
105+
106+
* To enable crun, you must enable the `TechPreviewNoUpgrade` feature set.
107+
+
108+
[NOTE]
109+
====
110+
Enabling the `TechPreviewNoUpgrade` feature set cannot be undone and prevents minor version updates. These feature sets are not recommended on production clusters.
111+
====
97112
98113
.Procedure
99114

modules/rhcos-about.adoc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,19 @@ The following list describes key features of the {op-system} operating system:
2424
* **Controlled immutability**: Although it contains {op-system-base} components, {op-system} is designed to be managed more tightly than a default {op-system-base} installation. Management is performed remotely from the {product-title} cluster. When you set up your {op-system} machines, you can modify only a few system settings. This controlled immutability allows {product-title} to store the latest state of {op-system} systems in the cluster so it is always able to create additional machines and perform updates based on the latest {op-system} configurations.
2525

2626
* **CRI-O container runtime**: Although {op-system} contains features for running the OCI- and libcontainer-formatted containers that Docker requires, it incorporates the CRI-O container engine instead of the Docker container engine. By focusing on features needed by Kubernetes platforms, such as {product-title}, CRI-O can offer specific compatibility with different Kubernetes versions. CRI-O also offers a smaller footprint and reduced attack surface than is possible with container engines that offer a larger feature set. At the moment, CRI-O is the only engine available within {product-title} clusters.
27+
+
28+
CRI-O can use either the runC or crun container runtime to start and manage containers. For information about how to enable crun, see the documentation for creating a `ContainerRuntimeConfig` CR.
29+
30+
:FeatureName: Support for the crun container runtime
31+
include::snippets/technology-preview.adoc[leveloffset=+1]
2732

2833
* **Set of container tools**: For tasks such as building, copying, and otherwise managing containers, {op-system} replaces the Docker CLI tool with a compatible set of container tools. The podman CLI tool supports many container runtime features, such as running, starting, stopping, listing, and removing containers and container images. The skopeo CLI tool can copy, authenticate, and sign images. You can use the `crictl` CLI tool to work with containers and pods from the CRI-O container engine. While direct use of these tools in {op-system} is discouraged, you can use them for debugging purposes.
2934

3035
* **rpm-ostree upgrades**: {op-system} features transactional upgrades using the `rpm-ostree` system. Updates are delivered by means of container images and are part of the {product-title} update process. When deployed, the container image is pulled, extracted, and written to disk, then the bootloader is modified to boot into the new version. The machine will reboot into the update in a rolling manner to ensure cluster capacity is minimally impacted.
3136

3237
* **bootupd firmware and bootloader updater**: Package managers and hybrid systems such as `rpm-ostree` do not update the firmware or the bootloader. With `bootupd`, {op-system} users have access to a cross-distribution, system-agnostic update tool that manages firmware and boot updates in UEFI and legacy BIOS boot modes that run on modern architectures, such as x86_64, ppc64le, and aarch64.
3338
+
34-
For information about how to install `bootupd`, see the documentation for _Updating the bootloader using bootupd_ for more information.
39+
For information about how to install `bootupd`, see the documentation for _Updating the bootloader using bootupd_.
3540

3641
* **Updated through the Machine Config Operator**: In {product-title}, the Machine Config Operator handles operating system upgrades. Instead of upgrading individual packages, as is done with `yum` upgrades, `rpm-ostree` delivers upgrades of the OS as an atomic unit. The new OS deployment is staged during upgrades and goes into effect on the next reboot. If something goes wrong with the upgrade, a single rollback and reboot returns the system to the previous state. {op-system} upgrades in {product-title} are performed during cluster updates.
3742

nodes/containers/nodes-containers-using.adoc

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ for years. {product-title} and
2525
Kubernetes add the ability to orchestrate containers across
2626
multi-host installations.
2727

28-
[discrete]
2928
[id="nodes-containers-memory"]
3029
== About containers and RHEL kernel memory
3130

@@ -40,9 +39,38 @@ To avoid losing containers due to kernel memory issues, ensure that the containe
4039
$(nproc) X 1/2 MiB
4140
----
4241

42+
[id="nodes-containers-runtimes"]
43+
== About the container engine and container runtime
4344

45+
A _container engine_ is a piece of software that processes user requests, including command line options and image pulls. The container engine uses a _container runtime_, also called a _lower-level container runtime_, to run and manage the components required to deploy and operate containers. You likely will not need to interact with the container engine or container runtime.
46+
47+
[NOTE]
48+
====
49+
The {product-title} documentation uses the term _container runtime_ to refer to the lower-level container runtime. Other documentation can refer to the container engine as the container runtime.
50+
====
51+
52+
{product-title} uses CRI-O as the container engine and runC or crun as the container runtime. The default container runtime is runC. Both container runtimes adhere to the link:https://www.opencontainers.org/[Open Container Initiative (OCI)] runtime specifications.
53+
54+
include::snippets/about-crio-snippet.adoc[]
55+
56+
runC, developed by Docker and maintained by the Open Container Project, is a lightweight, portable container runtime written in Go. crun, developed by Red Hat, is a fast and low-memory container runtime fully written in C. As of {product-title} {product-version}, you can select between the two.
57+
58+
:FeatureName: crun container runtime support
59+
include::snippets/technology-preview.adoc[]
60+
61+
crun has several improvements over runC, including:
62+
63+
* Smaller binary
64+
* Quicker processing
65+
* Lower memory footprint
66+
67+
runC has some benefits over crun, including:
68+
69+
* Most popular OCI container runtime.
70+
* Longer tenure in production.
71+
* Default container runtime of CRI-O.
72+
73+
You can move between the two container runtimes as needed.
74+
75+
For information on setting which container runtime to use, see xref:../../post_installation_configuration/machine-configuration-tasks.html#create-a-containerruntimeconfig_post-install-machine-configuration-tasks[Creating a `ContainerRuntimeConfig` CR to edit CRI-O parameters].
4476

45-
// The following include statements pull in the module files that comprise
46-
// the assembly. Include any combination of concept, procedure, or reference
47-
// modules required to cover the user story. You can also include other
48-
// assemblies.

snippets/about-crio-snippet.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Text snippet included in the following modules:
2+
//
3+
// * modules/about-crio.adoc
4+
// * modules/nodes-containers-using.adoc
5+
6+
:_content-type: SNIPPET
7+
8+
CRI-O is a Kubernetes-native container engine implementation that integrates closely with the operating system to deliver an efficient and optimized Kubernetes experience. The CRI-O container engine runs as a systemd service on each {product-title} cluster node.

0 commit comments

Comments
 (0)