Skip to content

Commit cb26f48

Browse files
author
Tim Bannister
committed
Tidy RuntimeClass page for v1.18
1 parent 899ab7b commit cb26f48

File tree

1 file changed

+11
-45
lines changed

1 file changed

+11
-45
lines changed

content/en/docs/concepts/containers/runtime-class.md

Lines changed: 11 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,14 @@ weight: 20
1313

1414
This page describes the RuntimeClass resource and runtime selection mechanism.
1515

16-
{{< warning >}}
17-
RuntimeClass includes *breaking* changes in the beta upgrade in v1.14. If you were using
18-
RuntimeClass prior to v1.14, see [Upgrading RuntimeClass from Alpha to
19-
Beta](#upgrading-runtimeclass-from-alpha-to-beta).
20-
{{< /warning >}}
16+
RuntimeClass is a feature for selecting the container runtime configuration. The container runtime
17+
configuration is used to run a Pod's containers.
2118

2219
{{% /capture %}}
2320

2421

2522
{{% capture body %}}
2623

27-
## Runtime Class
28-
29-
RuntimeClass is a feature for selecting the container runtime configuration. The container runtime
30-
configuration is used to run a Pod's containers.
31-
3224
## Motivation
3325

3426
You can set a different RuntimeClass between different Pods to provide a balance of
@@ -41,7 +33,7 @@ additional overhead.
4133
You can also use RuntimeClass to run different Pods with the same container runtime
4234
but with different settings.
4335

44-
### Set Up
36+
## Set up
4537

4638
Ensure the RuntimeClass feature gate is enabled (it is by default). See [Feature
4739
Gates](/docs/reference/command-line-tools-reference/feature-gates/) for an explanation of enabling
@@ -50,7 +42,7 @@ feature gates. The `RuntimeClass` feature gate must be enabled on apiservers _an
5042
1. Configure the CRI implementation on nodes (runtime dependent)
5143
2. Create the corresponding RuntimeClass resources
5244

53-
#### 1. Configure the CRI implementation on nodes
45+
### 1. Configure the CRI implementation on nodes
5446

5547
The configurations available through RuntimeClass are Container Runtime Interface (CRI)
5648
implementation dependent. See the corresponding documentation ([below](#cri-configuration)) for your
@@ -65,7 +57,7 @@ heterogenous node configurations, see [Scheduling](#scheduling) below.
6557
The configurations have a corresponding `handler` name, referenced by the RuntimeClass. The
6658
handler must be a valid DNS 1123 label (alpha-numeric + `-` characters).
6759

68-
#### 2. Create the corresponding RuntimeClass resources
60+
### 2. Create the corresponding RuntimeClass resources
6961

7062
The configurations setup in step 1 should each have an associated `handler` name, which identifies
7163
the configuration. For each handler, create a corresponding RuntimeClass object.
@@ -88,7 +80,7 @@ restricted to the cluster administrator. This is typically the default. See [Aut
8880
Overview](/docs/reference/access-authn-authz/authorization/) for more details.
8981
{{< /note >}}
9082
91-
### Usage
83+
## Usage
9284
9385
Once RuntimeClasses are configured for the cluster, using them is very simple. Specify a
9486
`runtimeClassName` in the Pod spec. For example:
@@ -147,14 +139,14 @@ See CRI-O's [config documentation][100] for more details.
147139
148140
[100]: https://raw.githubusercontent.com/cri-o/cri-o/9f11d1d/docs/crio.conf.5.md
149141
150-
### Scheduling
142+
## Scheduling
151143
152144
{{< feature-state for_k8s_version="v1.16" state="beta" >}}
153145
154146
As of Kubernetes v1.16, RuntimeClass includes support for heterogenous clusters through its
155147
`scheduling` fields. Through the use of these fields, you can ensure that pods running with this
156148
RuntimeClass are scheduled to nodes that support it. To use the scheduling support, you must have
157-
the RuntimeClass [admission controller][] enabled (the default, as of 1.16).
149+
the [RuntimeClass admission controller][] enabled (the default, as of 1.16).
158150
159151
To ensure pods land on nodes supporting a specific RuntimeClass, that set of nodes should have a
160152
common label which is then selected by the `runtimeclass.scheduling.nodeSelector` field. The
@@ -170,7 +162,7 @@ by each.
170162
To learn more about configuring the node selector and tolerations, see [Assigning Pods to
171163
Nodes](/docs/concepts/configuration/assign-pod-node/).
172164
173-
[admission controller]: /docs/reference/access-authn-authz/admission-controllers/
165+
[RuntimeClass admission controller]: /docs/reference/access-authn-authz/admission-controllers/#runtimeclass
174166
175167
### Pod Overhead
176168
@@ -186,34 +178,8 @@ Pod overhead is defined in RuntimeClass through the `Overhead` fields. Through t
186178
you can specify the overhead of running pods utilizing this RuntimeClass and ensure these overheads
187179
are accounted for in Kubernetes.
188180
189-
### Upgrading RuntimeClass from Alpha to Beta
190-
191-
The RuntimeClass Beta feature includes the following changes:
192-
193-
- The `node.k8s.io` API group and `runtimeclasses.node.k8s.io` resource have been migrated to a
194-
built-in API from a CustomResourceDefinition.
195-
- The `spec` has been inlined in the RuntimeClass definition (i.e. there is no more
196-
RuntimeClassSpec).
197-
- The `runtimeHandler` field has been renamed `handler`.
198-
- The `handler` field is now required in all API versions. This means the `runtimeHandler` field in
199-
the Alpha API is also required.
200-
- The `handler` field must be a valid DNS label ([RFC 1123](https://tools.ietf.org/html/rfc1123)),
201-
meaning it can no longer contain `.` characters (in all versions). Valid handlers match the
202-
following regular expression: `^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`.
203-
204-
**Action Required:** The following actions are required to upgrade from the alpha version of the
205-
RuntimeClass feature to the beta version:
206-
207-
- RuntimeClass resources must be recreated *after* upgrading to v1.14, and the
208-
`runtimeclasses.node.k8s.io` CRD should be manually deleted:
209-
```
210-
kubectl delete customresourcedefinitions.apiextensions.k8s.io runtimeclasses.node.k8s.io
211-
```
212-
- Alpha RuntimeClasses with an unspecified or empty `runtimeHandler` or those using a `.` character
213-
in the handler are no longer valid, and must be migrated to a valid handler configuration (see
214-
above).
215-
216-
### Further Reading
181+
{{% /capture %}}
182+
{{% capture whatsnext %}}
217183
218184
- [RuntimeClass Design](https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/runtime-class.md)
219185
- [RuntimeClass Scheduling Design](https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/runtime-class-scheduling.md)

0 commit comments

Comments
 (0)