Skip to content

Commit 5130686

Browse files
committed
Fix nits in the Evented PLEG page
There are typos and inaccuracies in the current page. This PR fixes them.
1 parent 7bdcd3d commit 5130686

File tree

1 file changed

+40
-30
lines changed

1 file changed

+40
-30
lines changed

content/en/docs/tasks/administer-cluster/switch-to-evented-pleg.md

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,94 +5,104 @@ content_type: task
55
weight: 90
66
---
77

8-
{{< feature-state for_k8s_version="v1.26" state="beta" >}}
8+
{{< feature-state for_k8s_version="v1.27" state="beta" >}}
99

1010
<!-- overview -->
1111

12-
This page shows how to migrate notes to use event based updates for container status. The event-based
12+
13+
This page shows how to migrate nodes to use event based updates for container status. The event-based
1314
implementation reduces node resource consumption by the kubelet, compared to the legacy approach
1415
that relies on polling.
1516
You may know this feature as _evented Pod lifecycle event generator (PLEG)_. That's the name used
1617
internally within the Kubernetes project for a key implementation detail.
1718

19+
The polling based approach is referred to as _generic PLEG_.
20+
1821
## {{% heading "prerequisites" %}}
1922

2023
* You need to run a version of Kubernetes that provides this feature.
21-
Kubernetes {{< skew currentVersion >}} includes beta support for event-based container
22-
status updates. The feature is beta and is disabled by default.
23-
{{< version-check >}}
24+
Kubernetes v1.27 includes beta support for event-based container
25+
status updates. The feature is beta but is _disabled_ by default
26+
because it requires support from the container runtime.
27+
* {{< version-check >}}
2428
If you are running a different version of Kubernetes, check the documentation for that release.
29+
* The container runtime in use must support container lifecycle events.
30+
The kubelet automatically switches back to the legacy generic PLEG
31+
mechanism if the container runtime does not announce support for
32+
container lifecycle events, even if you have this feature gate enabled.
2533

2634
<!-- steps -->
2735

2836
## Why switch to Evented PLEG?
2937

30-
* The current `Generic PLEG` incurs non-negligible overhead due to frequent polling of container statuses.
31-
* This overhead is exacerbated by Kubelet's parallelism, limiting its scalability
32-
and causing poor performance and reliability problems.
33-
* The goal of `Evented PLEG` is to reduce unnecessary work during inactivity by replacing periodic polling.
38+
* The _Generic PLEG_ incurs non-negligible overhead due to frequent polling of container statuses.
39+
* This overhead is exacerbated by Kubelet's parallelized polling of container states, thus limiting
40+
its scalability and causing poor performance and reliability problems.
41+
* The goal of _Evented PLEG_ is to reduce unnecessary work during inactivity
42+
by replacing periodic polling.
3443

3544
## Switching to Evented PLEG
3645

3746
1. Start the Kubelet with the [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
38-
`EventedPLEG` enabled. In Kubelet feature gates can be enabled by editing
39-
[config file](/docs/tasks/administer-cluster/kubelet-config-file/) and restarting the Kubelet service.
47+
`EventedPLEG` enabled. You can manage the kubelet feature gates editing the kubelet
48+
[config file](/docs/tasks/administer-cluster/kubelet-config-file/) and restarting the kubelet service.
49+
You need to do this on each node where you are using this feature.
4050

41-
2. Please make sure the node is [drained](/docs/tasks/administer-cluster/safely-drain-node/) before proceeding.
51+
2. Make sure the node is [drained](/docs/tasks/administer-cluster/safely-drain-node/) before proceeding.
4252

43-
3. Start the `CRI Runtime` with the `Evented PLEG` support.
53+
3. Start the container runtime with the container event generation enabled.
4454

4555
{{< tabs name="tab_with_code" >}}
46-
47-
{{% tab name="containerd" %}}
56+
{{% tab name="Containerd" %}}
4857
Version 1.7+
4958
{{% /tab %}}
50-
5159
{{% tab name="CRI-O" %}}
5260
Version 1.26+
5361

54-
Check if the CRI-O is already configured to emit `CRI Events` by verifying the configuration:
62+
Check if the CRI-O is already configured to emit CRI events by verifying the configuration,
5563

5664
```shell
5765
crio config | grep enable_pod_events
5866
```
5967

60-
If it is enabled it should show:
68+
If it is enabled, the output should be similar to the following:
6169

62-
```
70+
```none
6371
enable_pod_events = true
6472
```
6573

66-
To enable it, start the cri-o daemon with the flag `--enable-pod-events=true` or using a drop in config like:
74+
To enable it, start the CRI-O daemon with the flag `--enable-pod-events=true` or
75+
use a dropin config with the following lines:
6776

68-
```
77+
```toml
6978
[crio.runtime]
7079
enable_pod_events: true
7180
```
72-
7381
{{% /tab %}}
7482
{{< /tabs >}}
7583

7684
{{< version-check >}}
7785

78-
4. Verify that `Evented PLEG` is in use by looking for the term `EventedPLEG` in the kubelet logs.
86+
4. Verify that the kubelet is using event-based container stage change monitoring.
87+
To check, look for the term `EventedPLEG` in the kubelet logs.
7988

80-
The output is similar to this:
89+
The output should be similar to this:
8190

82-
```
91+
```console
8392
I0314 11:10:13.909915 1105457 feature_gate.go:249] feature gates: &{map[EventedPLEG:true]}
8493
```
8594

86-
If you have set LOG_LEVEL to 4 and above, you might see more entries that
87-
indicate `Evented PLEG` is in use by the kubelet.
95+
If you have set `--v` to 4 and above, you might see more entries that indicate
96+
that the kubelet is using event-based container state monitoring.
8897

89-
```
98+
```console
9099
I0314 11:12:42.009542 1110177 evented.go:238] "Evented PLEG: Generated pod status from the received event" podUID=3b2c6172-b112-447a-ba96-94e7022912dc
91100
I0314 11:12:44.623326 1110177 evented.go:238] "Evented PLEG: Generated pod status from the received event" podUID=b3fba5ea-a8c5-4b76-8f43-481e17e8ec40
92101
I0314 11:12:44.714564 1110177 evented.go:238] "Evented PLEG: Generated pod status from the received event" podUID=b3fba5ea-a8c5-4b76-8f43-481e17e8ec40
93102
```
94103

95104
## {{% heading "whatsnext" %}}
96105

97-
* Learn more about
98-
[KEP 3386](http://github.com/kubernetes/enhancements/blob/5b258a990adabc2ffdc9d84581ea6ed696f7ce6c/keps/sig-node/3386-kubelet-evented-pleg/README.md).
106+
* Learn more about the design in the Kubernetes Enhancement Proposal (KEP):
107+
[Kubelet Evented PLEG for Better Performance](http://github.com/kubernetes/enhancements/blob/5b258a990adabc2ffdc9d84581ea6ed696f7ce6c/keps/sig-node/3386-kubelet-evented-pleg/README.md).
108+

0 commit comments

Comments
 (0)