@@ -8,28 +8,28 @@ weight: 30
8
8
<!-- overview -->
9
9
10
10
This page shows how to configure Pods so that they will be assigned particular
11
- Quality of Service (QoS) classes. Kubernetes uses QoS classes to make decisions about evicting Pods when Node resources are exceeded.
11
+ {{< glossary_tooltip text="Quality of Service (QoS) classes" term_id="qos-class" >}}.
12
+ Kubernetes uses QoS classes to make decisions about evicting Pods when Node resources are exceeded.
12
13
13
14
15
+ When Kubernetes creates a Pod it assigns one of these QoS classes to the Pod:
16
+
17
+ * [ Guaranteed] ( /docs/concepts/workloads/pods/pod-qos/#guaranteed )
18
+ * [ Burstable] ( /docs/concepts/workloads/pods/pod-qos/#burstable )
19
+ * [ BestEffort] ( /docs/concepts/workloads/pods/pod-qos/#besteffort )
14
20
15
21
16
22
## {{% heading "prerequisites" %}}
17
23
18
24
19
- {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
25
+ {{< include "task-tutorial-prereqs.md" >}}
20
26
27
+ You also need to be able to create and delete namespaces.
21
28
22
29
23
30
24
31
<!-- steps -->
25
32
26
- ## QoS classes
27
-
28
- When Kubernetes creates a Pod it assigns one of these QoS classes to the Pod:
29
-
30
- * Guaranteed
31
- * Burstable
32
- * BestEffort
33
33
34
34
## Create a namespace
35
35
@@ -42,7 +42,7 @@ kubectl create namespace qos-example
42
42
43
43
## Create a Pod that gets assigned a QoS class of Guaranteed
44
44
45
- For a Pod to be given a QoS class of Guaranteed:
45
+ For a Pod to be given a QoS class of ` Guaranteed ` :
46
46
47
47
* Every Container in the Pod must have a memory limit and a memory request.
48
48
* For every Container in the Pod, the memory limit must equal the memory request.
@@ -53,7 +53,7 @@ These restrictions apply to init containers and app containers equally.
53
53
[ Ephemeral containers] ( /docs/concepts/workloads/pods/ephemeral-containers/ )
54
54
cannot define resources so these restrictions do not apply.
55
55
56
- Here is the configuration file for a Pod that has one Container. The Container has a memory limit and a
56
+ Here is a manifest for a Pod that has one Container. The Container has a memory limit and a
57
57
memory request, both equal to 200 MiB. The Container has a CPU limit and a CPU request, both equal to 700 milliCPU:
58
58
59
59
{{< codenew file="pods/qos/qos-pod.yaml" >}}
@@ -70,7 +70,7 @@ View detailed information about the Pod:
70
70
kubectl get pod qos-demo --namespace=qos-example --output=yaml
71
71
```
72
72
73
- The output shows that Kubernetes gave the Pod a QoS class of Guaranteed. The output also
73
+ The output shows that Kubernetes gave the Pod a QoS class of ` Guaranteed ` . The output also
74
74
verifies that the Pod Container has a memory request that matches its memory limit, and it has
75
75
a CPU request that matches its CPU limit.
76
76
@@ -105,12 +105,12 @@ kubectl delete pod qos-demo --namespace=qos-example
105
105
106
106
## Create a Pod that gets assigned a QoS class of Burstable
107
107
108
- A Pod is given a QoS class of Burstable if:
108
+ A Pod is given a QoS class of ` Burstable ` if:
109
109
110
- * The Pod does not meet the criteria for QoS class Guaranteed.
110
+ * The Pod does not meet the criteria for QoS class ` Guaranteed ` .
111
111
* At least one Container in the Pod has a memory or CPU request or limit.
112
112
113
- Here is the configuration file for a Pod that has one Container. The Container has a memory limit of 200 MiB
113
+ Here is a manifest for a Pod that has one Container. The Container has a memory limit of 200 MiB
114
114
and a memory request of 100 MiB.
115
115
116
116
{{< codenew file="pods/qos/qos-pod-2.yaml" >}}
@@ -127,7 +127,7 @@ View detailed information about the Pod:
127
127
kubectl get pod qos-demo-2 --namespace=qos-example --output=yaml
128
128
```
129
129
130
- The output shows that Kubernetes gave the Pod a QoS class of Burstable.
130
+ The output shows that Kubernetes gave the Pod a QoS class of ` Burstable ` :
131
131
132
132
``` yaml
133
133
spec :
@@ -153,10 +153,10 @@ kubectl delete pod qos-demo-2 --namespace=qos-example
153
153
154
154
## Create a Pod that gets assigned a QoS class of BestEffort
155
155
156
- For a Pod to be given a QoS class of BestEffort, the Containers in the Pod must not
156
+ For a Pod to be given a QoS class of ` BestEffort ` , the Containers in the Pod must not
157
157
have any memory or CPU limits or requests.
158
158
159
- Here is the configuration file for a Pod that has one Container. The Container has no memory or CPU
159
+ Here is a manifest for a Pod that has one Container. The Container has no memory or CPU
160
160
limits or requests:
161
161
162
162
{{< codenew file="pods/qos/qos-pod-3.yaml" >}}
@@ -173,7 +173,7 @@ View detailed information about the Pod:
173
173
kubectl get pod qos-demo-3 --namespace=qos-example --output=yaml
174
174
```
175
175
176
- The output shows that Kubernetes gave the Pod a QoS class of BestEffort.
176
+ The output shows that Kubernetes gave the Pod a QoS class of ` BestEffort ` :
177
177
178
178
``` yaml
179
179
spec :
@@ -193,13 +193,13 @@ kubectl delete pod qos-demo-3 --namespace=qos-example
193
193
194
194
## Create a Pod that has two Containers
195
195
196
- Here is the configuration file for a Pod that has two Containers. One container specifies a memory
196
+ Here is a manifest for a Pod that has two Containers. One container specifies a memory
197
197
request of 200 MiB. The other Container does not specify any requests or limits.
198
198
199
199
{{< codenew file="pods/qos/qos-pod-4.yaml" >}}
200
200
201
- Notice that this Pod meets the criteria for QoS class Burstable. That is, it does not meet the
202
- criteria for QoS class Guaranteed, and one of its Containers has a memory request.
201
+ Notice that this Pod meets the criteria for QoS class ` Burstable ` . That is, it does not meet the
202
+ criteria for QoS class ` Guaranteed ` , and one of its Containers has a memory request.
203
203
204
204
Create the Pod:
205
205
@@ -213,7 +213,7 @@ View detailed information about the Pod:
213
213
kubectl get pod qos-demo-4 --namespace=qos-example --output=yaml
214
214
```
215
215
216
- The output shows that Kubernetes gave the Pod a QoS class of Burstable:
216
+ The output shows that Kubernetes gave the Pod a QoS class of ` Burstable ` :
217
217
218
218
``` yaml
219
219
spec :
0 commit comments