Skip to content

Commit eb1b322

Browse files
authored
Merge pull request #71924 from mburke5678/pod-per-core-max-pods-snippet
Add Snippet for maxPods and podsPerCore
2 parents bf49ea0 + 96515cc commit eb1b322

File tree

3 files changed

+56
-69
lines changed

3 files changed

+56
-69
lines changed

modules/recommended-node-host-practices.adoc

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -9,50 +9,4 @@ The {product-title} node configuration file contains important options. For
99
example, two parameters control the maximum number of pods that can be scheduled
1010
to a node: `podsPerCore` and `maxPods`.
1111

12-
When both options are in use, the lower of the two values limits the number of
13-
pods on a node. Exceeding these values can result in:
14-
15-
* Increased CPU utilization.
16-
* Slow pod scheduling.
17-
* Potential out-of-memory scenarios, depending on the amount of memory in the node.
18-
* Exhausting the pool of IP addresses.
19-
* Resource overcommitting, leading to poor user application performance.
20-
21-
[IMPORTANT]
22-
====
23-
In Kubernetes, a pod that is holding a single container actually uses two
24-
containers. The second container is used to set up networking prior to the
25-
actual container starting. Therefore, a system running 10 pods will actually
26-
have 20 containers running.
27-
====
28-
29-
[NOTE]
30-
====
31-
Disk IOPS throttling from the cloud provider might have an impact on CRI-O and kubelet.
32-
They might get overloaded when there are large number of I/O intensive pods running on
33-
the nodes. It is recommended that you monitor the disk I/O on the nodes and use volumes
34-
with sufficient throughput for the workload.
35-
====
36-
37-
`podsPerCore` sets the number of pods the node can run based on the number of
38-
processor cores on the node. For example, if `podsPerCore` is set to `10` on a
39-
node with 4 processor cores, the maximum number of pods allowed on the node will
40-
be `40`.
41-
42-
[source,yaml]
43-
----
44-
kubeletConfig:
45-
podsPerCore: 10
46-
----
47-
48-
Setting `podsPerCore` to `0` disables this limit. The default is `0`.
49-
`podsPerCore` cannot exceed `maxPods`.
50-
51-
`maxPods` sets the number of pods the node can run to a fixed value, regardless
52-
of the properties of the node.
53-
54-
[source,yaml]
55-
----
56-
kubeletConfig:
57-
maxPods: 250
58-
----
12+
include::snippets/nodes-pods-core-max-pods.adoc[]

nodes/nodes/nodes-nodes-managing-max-pods.adoc

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,7 @@ In {product-title}, you can configure the number of pods that can run on a node
1010
processor cores on the node, a hard limit or both. If you use both options,
1111
the lower of the two limits the number of pods on a node.
1212

13-
Exceeding these values can result in:
14-
15-
* Increased CPU utilization by {product-title}.
16-
* Slow pod scheduling.
17-
* Potential out-of-memory scenarios, depending on the amount of memory in the node.
18-
* Exhausting the IP address pool.
19-
* Resource overcommitting, leading to poor user application performance.
20-
21-
[NOTE]
22-
====
23-
A pod that is holding a single container actually uses two
24-
containers. The second container sets up networking prior to the
25-
actual container starting. As a result, a node running 10 pods actually
26-
has 20 containers running.
27-
====
28-
29-
The `podsPerCore` parameter limits the number of pods the node can run based on the number of
30-
processor cores on the node. For example, if `podsPerCore` is set to `10` on
31-
a node with 4 processor cores, the maximum number of pods allowed on the node is 40.
32-
33-
The `maxPods` parameter limits the number of pods the node can run to a fixed value, regardless
34-
of the properties of the node.
13+
include::snippets/nodes-pods-core-max-pods.adoc[]
3514

3615
// The following include statements pull in the module files that comprise
3716
// the assembly. Include any combination of concept, procedure, or reference
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
// Text snippet included in the following modules:
2+
//
3+
// * nodes/nodes/nodes-nodes-managing-max-pods.adoc
4+
// * modules/recommended-node-host-practices.adoc
5+
6+
:_mod-docs-content-type: SNIPPET
7+
8+
When both options are in use, the lower of the two values limits the number of
9+
pods on a node. Exceeding these values can result in:
10+
11+
* Increased CPU utilization.
12+
* Slow pod scheduling.
13+
* Potential out-of-memory scenarios, depending on the amount of memory in the node.
14+
* Exhausting the pool of IP addresses.
15+
* Resource overcommitting, leading to poor user application performance.
16+
17+
[IMPORTANT]
18+
====
19+
In Kubernetes, a pod that is holding a single container actually uses two
20+
containers. The second container is used to set up networking prior to the
21+
actual container starting. Therefore, a system running 10 pods will actually
22+
have 20 containers running.
23+
====
24+
25+
[NOTE]
26+
====
27+
Disk IOPS throttling from the cloud provider might have an impact on CRI-O and kubelet.
28+
They might get overloaded when there are large number of I/O intensive pods running on
29+
the nodes. It is recommended that you monitor the disk I/O on the nodes and use volumes
30+
with sufficient throughput for the workload.
31+
====
32+
33+
The `podsPerCore` parameter sets the number of pods the node can run based on the number of
34+
processor cores on the node. For example, if `podsPerCore` is set to `10` on a
35+
node with 4 processor cores, the maximum number of pods allowed on the node will
36+
be `40`.
37+
38+
[source,yaml]
39+
----
40+
kubeletConfig:
41+
podsPerCore: 10
42+
----
43+
44+
Setting `podsPerCore` to `0` disables this limit. The default is `0`.
45+
The value of the `podsPerCore` parameter cannot exceed the value of the `maxPods` parameter.
46+
47+
The `maxPods` parameter sets the number of pods the node can run to a fixed value, regardless
48+
of the properties of the node.
49+
50+
[source,yaml]
51+
----
52+
kubeletConfig:
53+
maxPods: 250
54+
----

0 commit comments

Comments
 (0)