|
| 1 | +--- |
| 2 | +title: Kubernetes 指标 (v1beta1) |
| 3 | +content_type: tool-reference |
| 4 | +package: metrics.k8s.io/v1beta1 |
| 5 | +--- |
| 6 | +<!-- |
| 7 | +title: Kubernetes Metrics (v1beta1) |
| 8 | +content_type: tool-reference |
| 9 | +package: metrics.k8s.io/v1beta1 |
| 10 | +auto_generated: true |
| 11 | +--> |
| 12 | + |
| 13 | +<!-- |
| 14 | +<p>Package v1beta1 is the v1beta1 version of the metrics API.</p> |
| 15 | +--> |
| 16 | +<p>v1beta1 包是 v1beta1 版本的指标 API。</p> |
| 17 | + |
| 18 | +<!-- |
| 19 | +## Resource Types |
| 20 | +--> |
| 21 | +## 资源类型 {#resource-types} |
| 22 | + |
| 23 | +- [NodeMetrics](#metrics-k8s-io-v1beta1-NodeMetrics) |
| 24 | +- [NodeMetricsList](#metrics-k8s-io-v1beta1-NodeMetricsList) |
| 25 | +- [PodMetrics](#metrics-k8s-io-v1beta1-PodMetrics) |
| 26 | +- [PodMetricsList](#metrics-k8s-io-v1beta1-PodMetricsList) |
| 27 | + |
| 28 | +## `NodeMetrics` {#metrics-k8s-io-v1beta1-NodeMetrics} |
| 29 | + |
| 30 | +<!-- |
| 31 | +**Appears in:** |
| 32 | +--> |
| 33 | +**出现在:** |
| 34 | + |
| 35 | +- [NodeMetricsList](#metrics-k8s-io-v1beta1-NodeMetricsList) |
| 36 | + |
| 37 | +<!-- |
| 38 | +<p>NodeMetrics sets resource usage metrics of a node.</p> |
| 39 | +--> |
| 40 | +<p>NodeMetrics 设置节点的资源用量指标。</p> |
| 41 | + |
| 42 | +<table class="table"> |
| 43 | +<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead> |
| 44 | +<tbody> |
| 45 | + |
| 46 | +<tr><td><code>apiVersion</code><br/>string</td><td><code>metrics.k8s.io/v1beta1</code></td></tr> |
| 47 | +<tr><td><code>kind</code><br/>string</td><td><code>NodeMetrics</code></td></tr> |
| 48 | + |
| 49 | + |
| 50 | +<tr><td><code>metadata</code><br/> |
| 51 | +<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta"><code>meta/v1.ObjectMeta</code></a> |
| 52 | +</td> |
| 53 | +<td> |
| 54 | + <!-- |
| 55 | + <p>Standard object's metadata. |
| 56 | +More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata</p> |
| 57 | +Refer to the Kubernetes API documentation for the fields of the <code>metadata</code> field. |
| 58 | + --> |
| 59 | + <p>标准的对象元数据。更多信息: |
| 60 | + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata</p> |
| 61 | +参阅 Kubernetes API 文档了解 <code>metadata</code> 字段。 |
| 62 | +</td> |
| 63 | +</tr> |
| 64 | +<tr><td><code>timestamp</code> <B><!--[Required]-->[必需]</B><br/> |
| 65 | +<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#time-v1-meta"><code>meta/v1.Time</code></a> |
| 66 | +</td> |
| 67 | +<td> |
| 68 | + <!-- |
| 69 | + <p>The following fields define time interval from which metrics were |
| 70 | +collected from the interval [Timestamp-Window, Timestamp].</p> |
| 71 | + --> |
| 72 | + <p>以下字段定义从时间间隔 [Timestamp-Window,Timestamp] 中收集指标的时间间隔。</p> |
| 73 | +</td> |
| 74 | +</tr> |
| 75 | +<tr><td><code>window</code> <B><!--[Required]-->[必需]</B><br/> |
| 76 | +<a href="https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration"><code>meta/v1.Duration</code></a> |
| 77 | +</td> |
| 78 | +<td> |
| 79 | + <span class="text-muted"> |
| 80 | + <!-- |
| 81 | + No description provided. |
| 82 | + --> |
| 83 | + 无描述。 |
| 84 | + </span></td> |
| 85 | +</tr> |
| 86 | +<tr><td><code>usage</code> <B><!--[Required]-->[必需]</B><br/> |
| 87 | +<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#resourcelist-v1-core"><code>core/v1.ResourceList</code></a> |
| 88 | +</td> |
| 89 | +<td> |
| 90 | + <!-- |
| 91 | + <p>The memory usage is the memory working set.</p> |
| 92 | + --> |
| 93 | + <p>内存用量是内存工作集。</p> |
| 94 | +</td> |
| 95 | +</tr> |
| 96 | +</tbody> |
| 97 | +</table> |
| 98 | + |
| 99 | +## `NodeMetricsList` {#metrics-k8s-io-v1beta1-NodeMetricsList} |
| 100 | + |
| 101 | +<!-- |
| 102 | +<p>NodeMetricsList is a list of NodeMetrics.</p> |
| 103 | +--> |
| 104 | +<p>NodeMetricsList 是 NodeMetrics 的列表。</p> |
| 105 | + |
| 106 | +<table class="table"> |
| 107 | +<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead> |
| 108 | +<tbody> |
| 109 | + |
| 110 | +<tr><td><code>apiVersion</code><br/>string</td><td><code>metrics.k8s.io/v1beta1</code></td></tr> |
| 111 | +<tr><td><code>kind</code><br/>string</td><td><code>NodeMetricsList</code></td></tr> |
| 112 | + |
| 113 | + |
| 114 | +<tr><td><code>metadata</code> <B><!--[Required]-->[必需]</B><br/> |
| 115 | +<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#listmeta-v1-meta"><code>meta/v1.ListMeta</code></a> |
| 116 | +</td> |
| 117 | +<td> |
| 118 | + <!-- |
| 119 | + <p>Standard list metadata. |
| 120 | +More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds</p> |
| 121 | + --> |
| 122 | + <p>标准的列表元数据。更多信息: |
| 123 | + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds</p> |
| 124 | +</td> |
| 125 | +</tr> |
| 126 | +<tr><td><code>items</code> <B><!--[Required]-->[必需]</B><br/> |
| 127 | +<a href="#metrics-k8s-io-v1beta1-NodeMetrics"><code>[]NodeMetrics</code></a> |
| 128 | +</td> |
| 129 | +<td> |
| 130 | + <!-- |
| 131 | + <p>List of node metrics.</p> |
| 132 | + --> |
| 133 | + <p>节点指标的列表。</p> |
| 134 | +</td> |
| 135 | +</tr> |
| 136 | +</tbody> |
| 137 | +</table> |
| 138 | + |
| 139 | +## `PodMetrics` {#metrics-k8s-io-v1beta1-PodMetrics} |
| 140 | + |
| 141 | +<!-- |
| 142 | +**Appears in:** |
| 143 | +--> |
| 144 | +**出现在:** |
| 145 | + |
| 146 | +- [PodMetricsList](#metrics-k8s-io-v1beta1-PodMetricsList) |
| 147 | + |
| 148 | +<!-- |
| 149 | +<p>PodMetrics sets resource usage metrics of a pod.</p> |
| 150 | +--> |
| 151 | +<p>PodMetrics 设置 Pod 的资源用量指标。</p> |
| 152 | + |
| 153 | +<table class="table"> |
| 154 | +<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead> |
| 155 | +<tbody> |
| 156 | + |
| 157 | +<tr><td><code>apiVersion</code><br/>string</td><td><code>metrics.k8s.io/v1beta1</code></td></tr> |
| 158 | +<tr><td><code>kind</code><br/>string</td><td><code>PodMetrics</code></td></tr> |
| 159 | + |
| 160 | + |
| 161 | +<tr><td><code>metadata</code><br/> |
| 162 | +<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta"><code>meta/v1.ObjectMeta</code></a> |
| 163 | +</td> |
| 164 | +<td> |
| 165 | + <!-- |
| 166 | + <p>Standard object's metadata. |
| 167 | +More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata</p> |
| 168 | +Refer to the Kubernetes API documentation for the fields of the <code>metadata</code> field. |
| 169 | + --> |
| 170 | + <p>标准的对象元数据。更多信息: |
| 171 | + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata</p> |
| 172 | +参阅 Kubernetes API 文档了解 <code>metadata</code> 字段。 |
| 173 | + |
| 174 | +</td> |
| 175 | +</tr> |
| 176 | +<tr><td><code>timestamp</code> <B><!--[Required]-->[必需]</B><br/> |
| 177 | +<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#time-v1-meta"><code>meta/v1.Time</code></a> |
| 178 | +</td> |
| 179 | +<td> |
| 180 | + <!-- |
| 181 | + <p>The following fields define time interval from which metrics were |
| 182 | +collected from the interval [Timestamp-Window, Timestamp].</p> |
| 183 | + --> |
| 184 | + <p>以下字段定义了从时间间隔 [Timestamp-Window,Timestamp] 中收集指标的时间间隔。</p> |
| 185 | +</td> |
| 186 | +</tr> |
| 187 | +<tr><td><code>window</code> <B><!--[Required]-->[必需]</B><br/> |
| 188 | +<a href="https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration"><code>meta/v1.Duration</code></a> |
| 189 | +</td> |
| 190 | +<td> |
| 191 | + <span class="text-muted"> |
| 192 | + <!-- |
| 193 | + No description provided. |
| 194 | + --> |
| 195 | + 无描述。 |
| 196 | + </span></td> |
| 197 | +</tr> |
| 198 | +<tr><td><code>containers</code> <B><!--[Required]-->[必需]</B><br/> |
| 199 | +<a href="#metrics-k8s-io-v1beta1-ContainerMetrics"><code>[]ContainerMetrics</code></a> |
| 200 | +</td> |
| 201 | +<td> |
| 202 | + <!-- |
| 203 | + <p>Metrics for all containers are collected within the same time window.</p> |
| 204 | + --> |
| 205 | + <p>在相同时间窗口内收集所有容器的指标。</p> |
| 206 | +</td> |
| 207 | +</tr> |
| 208 | +</tbody> |
| 209 | +</table> |
| 210 | + |
| 211 | +## `PodMetricsList` {#metrics-k8s-io-v1beta1-PodMetricsList} |
| 212 | + |
| 213 | +<!-- |
| 214 | +<p>PodMetricsList is a list of PodMetrics.</p> |
| 215 | +--> |
| 216 | +<p>PodMetricsList 是 PodMetrics 的列表。</p> |
| 217 | + |
| 218 | +<table class="table"> |
| 219 | +<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead> |
| 220 | +<tbody> |
| 221 | + |
| 222 | +<tr><td><code>apiVersion</code><br/>string</td><td><code>metrics.k8s.io/v1beta1</code></td></tr> |
| 223 | +<tr><td><code>kind</code><br/>string</td><td><code>PodMetricsList</code></td></tr> |
| 224 | + |
| 225 | +<tr><td><code>metadata</code> <B><!--[Required]-->[必需]</B><br/> |
| 226 | +<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#listmeta-v1-meta"><code>meta/v1.ListMeta</code></a> |
| 227 | +</td> |
| 228 | +<td> |
| 229 | + <!-- |
| 230 | + <p>Standard list metadata. |
| 231 | +More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds</p> |
| 232 | + --> |
| 233 | + <p>标准的列表元数据。更多信息: |
| 234 | + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds</p> |
| 235 | +</td> |
| 236 | +</tr> |
| 237 | +<tr><td><code>items</code> <B><!--[Required]-->[必需]</B><br/> |
| 238 | +<a href="#metrics-k8s-io-v1beta1-PodMetrics"><code>[]PodMetrics</code></a> |
| 239 | +</td> |
| 240 | +<td> |
| 241 | + <!-- |
| 242 | + <p>List of pod metrics.</p> |
| 243 | + --> |
| 244 | + <p>Pod 指标的列表。</p> |
| 245 | +</td> |
| 246 | +</tr> |
| 247 | +</tbody> |
| 248 | +</table> |
| 249 | + |
| 250 | +## `ContainerMetrics` {#metrics-k8s-io-v1beta1-ContainerMetrics} |
| 251 | + |
| 252 | +<!-- |
| 253 | +**Appears in:** |
| 254 | +--> |
| 255 | +**出现在:** |
| 256 | + |
| 257 | +- [PodMetrics](#metrics-k8s-io-v1beta1-PodMetrics) |
| 258 | + |
| 259 | +<!-- |
| 260 | +<p>ContainerMetrics sets resource usage metrics of a container.</p> |
| 261 | +--> |
| 262 | +<p>ContainerMetrics 设置容器的资源用量指标。</p> |
| 263 | + |
| 264 | +<table class="table"> |
| 265 | +<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead> |
| 266 | +<tbody> |
| 267 | + |
| 268 | + |
| 269 | +<tr><td><code>name</code> <B><!--[Required]-->[必需]</B><br/> |
| 270 | +<code>string</code> |
| 271 | +</td> |
| 272 | +<td> |
| 273 | + <!-- |
| 274 | + <p>Container name corresponding to the one from pod.spec.containers.</p> |
| 275 | + --> |
| 276 | + <p>与 pod.spec.containers 中某个对应的容器名称。</p> |
| 277 | +</td> |
| 278 | +</tr> |
| 279 | +<tr><td><code>usage</code> <B><!--[Required]-->[必需]</B><br/> |
| 280 | +<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#resourcelist-v1-core"><code>core/v1.ResourceList</code></a> |
| 281 | +</td> |
| 282 | +<td> |
| 283 | + <!-- |
| 284 | + <p>The memory usage is the memory working set.</p> |
| 285 | + --> |
| 286 | + <p>内存用量是内容工作集。</p> |
| 287 | +</td> |
| 288 | +</tr> |
| 289 | +</tbody> |
| 290 | +</table> |
0 commit comments