website/content/zh-cn/docs/reference/kubernetes-api/cluster-resources/component-status-v1.md

6.9 KiB
Raw Blame History

api_metadata content_type description title weight
apiVersion import kind
v1 k8s.io/api/core/v1 ComponentStatus
api_reference ComponentStatus和 ComponentStatusList保存集群检验信息。 ComponentStatus 10

apiVersion: v1

import "k8s.io/api/core/v1"

ComponentStatus

ComponentStatus和 ComponentStatusList保存集群检验信息。 已废弃:该 API 在 v1.19 及更高版本中废弃。


  • apiVersion: v1

  • kind: ComponentStatus

  • metadata (<a href="{{< ref "../common-definitions/object-meta#ObjectMeta" >}}">ObjectMeta)

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

  • conditions ([]ComponentCondition)

    补丁策略:基于键 type 合并

    观测到的组件状况的列表。

    组件状况相关信息。

    • conditions.status (string),必需

      组件状况的状态。“Healthy” 的有效值为“True”、“False” 或 “Unknown”。

    • conditions.type (string),必需

    组件状况的类型。有效值“Healthy”

    • conditions.error (string)

      组件状况的错误码。例如,一个健康检查错误码。

    • conditions.message (string)

      组件状况相关消息。例如,有关健康检查的信息。

ComponentStatusList

作为 ComponentStatus 对象列表,所有组件状况的状态。 已废弃:该 API 在 v1.19 及更高版本中废弃。


  • apiVersion: v1

  • kind: ComponentStatusList

操作


get 读取指定的 ComponentStatus

HTTP 请求

GET /api/v1/componentstatuses/{name}

参数

  • name (路径参数): string必需

    ComponentStatus 的名称

  • pretty (查询参数): string

    <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty

响应

200 (<a href="{{< ref "../cluster-resources/component-status-v1#ComponentStatus" >}}">ComponentStatus): OK

401: Unauthorized

list 列出 ComponentStatus 类别的对象

HTTP 请求

GET /api/v1/componentstatuses

参数

  • allowWatchBookmarks (查询参数): boolean

    <a href="{{< ref "../common-parameters/common-parameters#allowWatchBookmarks" >}}">allowWatchBookmarks

  • continue (查询参数): string

    <a href="{{< ref "../common-parameters/common-parameters#continue" >}}">continue

  • fieldSelector (查询参数): string

    <a href="{{< ref "../common-parameters/common-parameters#fieldSelector" >}}">fieldSelector

  • labelSelector (查询参数): string

    <a href="{{< ref "../common-parameters/common-parameters#labelSelector" >}}">labelSelector

  • limit (查询参数): integer

    <a href="{{< ref "../common-parameters/common-parameters#limit" >}}">limit

  • pretty (查询参数): string

    <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty

  • resourceVersion (查询参数): string

    <a href="{{< ref "../common-parameters/common-parameters#resourceVersion" >}}">resourceVersion

  • resourceVersionMatch (查询参数): string

    <a href="{{< ref "../common-parameters/common-parameters#resourceVersionMatch" >}}">resourceVersionMatch

  • sendInitialEvents (查询参数): boolean

    <a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents

  • timeoutSeconds (查询参数): integer

    <a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds

  • watch (查询参数): boolean

    <a href="{{< ref "../common-parameters/common-parameters#watch" >}}">watch

响应

200 (<a href="{{< ref "../cluster-resources/component-status-v1#ComponentStatusList" >}}">ComponentStatusList): OK

401: Unauthorized