×
描述

NodeMetrics 设置节点的资源使用情况指标。

类型

对象

必需
  • 时间戳

  • 窗口

  • 使用情况

规格

属性 类型 描述

apiVersion

字符串

APIVersion 定义了对象的此表示形式的版本化模式。服务器应将识别的模式转换为最新的内部值,并可能拒绝无法识别的值。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

kind

字符串

Kind 是一个字符串值,表示此对象表示的 REST 资源。服务器可以从客户端提交请求的端点推断出这一点。无法更新。使用驼峰式命名法。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

metadata

ObjectMeta_v2

标准对象的元数据。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata

时间戳

时间

以下字段定义从区间 [Timestamp-Window, Timestamp] 收集指标的时间间隔。

使用情况

对象(数量)

内存使用量是内存工作集。

窗口

持续时间

API 端点

提供以下 API 端点

  • /apis/metrics.k8s.io/v1beta1/nodes

    • GET:列出 NodeMetrics 类型的对象

  • /apis/metrics.k8s.io/v1beta1/nodes/{name}

    • GET:读取指定的 NodeMetrics

/apis/metrics.k8s.io/v1beta1/nodes

HTTP 方法

GET

描述

列出 NodeMetrics 类型的对象

表 1. HTTP 响应
HTTP 代码 响应正文

200 - 确定

NodeMetricsList 模式

/apis/metrics.k8s.io/v1beta1/nodes/{name}

表 2. 全局路径参数
参数 类型 描述

name

字符串

NodeMetrics 的名称

HTTP 方法

GET

描述

读取指定的 NodeMetrics

表 3. HTTP 响应
HTTP 代码 响应正文

200 - 确定

NodeMetrics 模式