@@ -65,18 +65,37 @@ You need to make sure a `RuntimeClass` is utilized which defines the `overhead`
65
65
<!--
66
66
## Usage example
67
67
-->
68
- ## 使用示例
68
+ ## 使用示例 {#usage-example}
69
69
70
70
<!--
71
71
To work with Pod overhead, you need a RuntimeClass that defines the `overhead` field. As
72
72
an example, you could use the following RuntimeClass definition with a virtualization container
73
- runtime that uses around 120MiB per Pod for the virtual machine and the guest OS:
73
+ runtime (in this example, Kata Containers combined with the Firecracker virtual machine monitor)
74
+ that uses around 120MiB per Pod for the virtual machine and the guest OS:
74
75
-->
75
76
要使用 Pod 开销,你需要一个定义了 ` overhead ` 字段的 RuntimeClass。
76
- 作为例子,下面的 RuntimeClass 定义中包含一个虚拟化所用的容器运行时,
77
- RuntimeClass 如下,其中每个 Pod 大约使用 120MiB 用来运行虚拟机和寄宿操作系统:
77
+ 例如,你可以使用以下 RuntimeClass 定义,其中使用了一个虚拟化容器运行时(在这个例子中,Kata Containers 与 Firecracker 虚拟机监视器结合使用),
78
+ 每个 Pod 使用大约 120MiB 的虚拟机和寄宿操作系统:
79
+
80
+ <!--
81
+ ```yaml
82
+ # You need to change this example to match the actual runtime name, and per-Pod
83
+ # resource overhead, that the container runtime is adding in your cluster.
84
+ apiVersion: node.k8s.io/v1
85
+ kind: RuntimeClass
86
+ metadata:
87
+ name: kata-fc
88
+ handler: kata-fc
89
+ overhead:
90
+ podFixed:
91
+ memory: "120Mi"
92
+ cpu: "250m"
93
+ ```
94
+ -->
78
95
79
96
``` yaml
97
+ # 你需要修改这个示例以匹配实际的运行时名称,
98
+ # 以及在你的集群中运行时在 Pod 层面增加的资源开销。
80
99
apiVersion : node.k8s.io/v1
81
100
kind : RuntimeClass
82
101
metadata :
@@ -234,7 +253,7 @@ The output shows requests for 2250m CPU, and for 320MiB of memory. The requests
234
253
<!--
235
254
## Verify Pod cgroup limits
236
255
-->
237
- ## 验证 Pod cgroup 限制
256
+ ## 验证 Pod cgroup 限制 {#verify-pod-cgroup-limits}
238
257
239
258
<!--
240
259
Check the Pod's memory cgroups on the node where the workload is running. In the following example,
@@ -313,7 +332,7 @@ This is 320 MiB, as expected:
313
332
<!--
314
333
### Observability
315
334
-->
316
- ### 可观察性
335
+ ### 可观察性 {#observability}
317
336
318
337
<!--
319
338
Some `kube_pod_overhead_*` metrics are available in [kube-state-metrics](https://github.com/kubernetes/kube-state-metrics)
0 commit comments