Node
apiVersion: v1
import "k8s.io/api/core/v1"
Node
节点是 Kubernetes 中的工作节点。每个节点在缓存中(即在 etcd 中)将具有唯一的标识符。
apiVersion: v1
kind: Node
metadata (ObjectMeta)
标准对象的元数据。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
spec (NodeSpec)
Spec 定义了节点的行为。 https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
status (NodeStatus)
最近观察到的节点状态。由系统填充。只读。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
NodeSpec
NodeSpec 描述了创建节点时使用的属性。
configSource (NodeConfigSource)
已弃用:以前用于指定节点配置的来源,用于 DynamicKubeletConfig 功能。此功能已移除。
NodeConfigSource 指定节点配置的来源。除元数据外,必须且仅有一个子字段非空。此 API 自 1.22 起已弃用
configSource.configMap (ConfigMapNodeConfigSource)
ConfigMap 是对节点的 ConfigMap 的引用
ConfigMapNodeConfigSource 包含信息,用于将 ConfigMap 引用为节点的配置源。此 API 自 1.22 起已弃用:https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration
configSource.configMap.kubeletConfigKey (string), required
KubeletConfigKey 声明引用 ConfigMap 的哪个键对应于 KubeletConfiguration 结构。此字段在所有情况下都是必需的。
configSource.configMap.name (string), required
Name 是引用 ConfigMap 的 metadata.name。此字段在所有情况下都是必需的。
configSource.configMap.namespace (string), required
Namespace 是引用 ConfigMap 的 metadata.namespace。此字段在所有情况下都是必需的。
configSource.configMap.resourceVersion (string)
ResourceVersion 是引用 ConfigMap 的 metadata.ResourceVersion。此字段在 Node.Spec 中被禁止,在 Node.Status 中是必需的。
configSource.configMap.uid (string)
UID 是引用 ConfigMap 的 metadata.UID。此字段在 Node.Spec 中被禁止,在 Node.Status 中是必需的。
externalID (string)
已弃用。并非所有 kubelet 都将设置此字段。在 1.13 之后移除此字段。请参阅:https://issues.k8s.io/61966
podCIDR (string)
PodCIDR 表示分配给节点的 Pod IP 范围。
podCIDRs ([]string)
podCIDRs 表示分配给节点的 IP 范围,供该节点上的 Pod 使用。如果指定此字段,则第 0 个条目必须与 podCIDR 字段匹配。它最多可以包含 IPv4 和 IPv6 各一个值。
providerID (string)
云提供商分配给节点的 ID,格式为:<ProviderName>://<ProviderSpecificNodeID>
taints ([]Taint)
如果指定,则为节点的污点。
此污点附加到的节点对任何不宽容该污点的 Pod 具有“影响”。
taints.effect (string), required
必需。污点对不宽容该污点的 Pod 的影响。有效影响包括 NoSchedule、PreferNoSchedule 和 NoExecute。
taints.key (string), required
必需。要应用于节点的污点键。
taints.timeAdded (Time)
TimeAdded 表示添加污点的时间。它仅针对 NoExecute 污点写入。
Time 是 time.Time 的包装器,支持正确地编组到 YAML 和 JSON。包装器为 time 包提供的许多工厂方法提供。
taints.value (string)
与污点键相对应的污点值。
unschedulable (boolean)
Unschedulable 控制节点对新 Pod 的调度能力。默认情况下,节点是可调度的。更多信息:https://kubernetes.ac.cn/docs/concepts/nodes/node/#manual-node-administration
NodeStatus
NodeStatus 是有关节点当前状态的信息。
addresses ([]NodeAddress)
修补策略:按键
type
合并可到达节点的地址列表。如果可用,则从云提供商查询。更多信息:https://kubernetes.ac.cn/docs/concepts/nodes/node/#addresses 注意:此字段声明为可合并的,但合并键不够唯一,这会导致数据在合并时损坏。调用者应改为使用完全替换修补程序。请参阅 https://pr.k8s.io/79391 以了解示例。使用者应假设地址在节点的生命周期内可能会发生变化。但是,在某些情况下,这可能无法实现,例如继承节点地址的 Pod 以及向下 API(status.hostIP)的使用者。
addresses.address (string), required
节点地址。
addresses.type (string), required
节点地址类型,包括 Hostname、ExternalIP 或 InternalIP 之一。
allocatable (map[string]Quantity)
Allocatable 表示节点上可用于调度的资源。默认为 Capacity。
capacity (map[string]Quantity)
Capacity 表示节点的总资源。更多信息:https://kubernetes.ac.cn/docs/concepts/storage/persistent-volumes#capacity
conditions ([]NodeCondition)
修补策略:按键
type
合并Conditions 是当前观察到的节点条件的数组。更多信息:https://kubernetes.ac.cn/docs/concepts/nodes/node/#condition
conditions.status (string), required
条件的状态,包括 True、False、Unknown 之一。
conditions.type (string), required
节点条件的类型。
conditions.lastHeartbeatTime (Time)
我们上次获取给定条件更新的时间。
Time 是 time.Time 的包装器,支持正确地编组到 YAML 和 JSON。包装器为 time 包提供的许多工厂方法提供。
conditions.lastTransitionTime (Time)
条件从一种状态转换到另一种状态的最后时间。
Time 是 time.Time 的包装器,支持正确地编组到 YAML 和 JSON。包装器为 time 包提供的许多工厂方法提供。
conditions.message (string)
指示上次转换详细信息的人类可读消息。
conditions.reason (string)
(简短)条件上次转换的原因。
config (NodeConfigStatus)
通过动态 Kubelet 配置功能分配给节点的配置的状态。
NodeConfigStatus 描述了通过 Node.Spec.ConfigSource 分配的配置的状态。
config.active (NodeConfigSource)
Active 报告节点正在积极使用的已检查点配置。Active 将表示 Assigned 配置的当前版本或当前 LastKnownGood 配置,具体取决于尝试使用 Assigned 配置是否会导致错误。
NodeConfigSource 指定节点配置的来源。除元数据外,必须且仅有一个子字段非空。此 API 自 1.22 起已弃用
config.active.configMap (ConfigMapNodeConfigSource)
ConfigMap 是对节点的 ConfigMap 的引用
ConfigMapNodeConfigSource 包含信息,用于将 ConfigMap 引用为节点的配置源。此 API 自 1.22 起已弃用:https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration
config.active.configMap.kubeletConfigKey (string), required
KubeletConfigKey 声明引用 ConfigMap 的哪个键对应于 KubeletConfiguration 结构。此字段在所有情况下都是必需的。
config.active.configMap.name (string), required
Name 是引用 ConfigMap 的 metadata.name。此字段在所有情况下都是必需的。
config.active.configMap.namespace (string), required
Namespace 是引用 ConfigMap 的 metadata.namespace。此字段在所有情况下都是必需的。
config.active.configMap.resourceVersion (string)
ResourceVersion 是引用 ConfigMap 的 metadata.ResourceVersion。此字段在 Node.Spec 中被禁止,在 Node.Status 中是必需的。
config.active.configMap.uid (string)
UID 是引用 ConfigMap 的 metadata.UID。此字段在 Node.Spec 中被禁止,在 Node.Status 中是必需的。
config.assigned (NodeConfigSource)
Assigned 报告节点将尝试使用的已检查点配置。当 Node.Spec.ConfigSource 更新时,节点会将关联的配置有效负载检查点到本地磁盘,以及一个记录,指示预期的配置。节点引用此记录来选择其配置检查点,并在 Assigned 中报告此记录。Assigned 仅在记录已检查点到磁盘后才会在状态中更新。当 Kubelet 重新启动时,它会尝试通过加载和验证 Assigned 标识的已检查点有效负载,使 Assigned 配置成为 Active 配置。
NodeConfigSource 指定节点配置的来源。除元数据外,必须且仅有一个子字段非空。此 API 自 1.22 起已弃用
config.assigned.configMap (ConfigMapNodeConfigSource)
ConfigMap 是对节点的 ConfigMap 的引用
ConfigMapNodeConfigSource 包含信息,用于将 ConfigMap 引用为节点的配置源。此 API 自 1.22 起已弃用:https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration
config.assigned.configMap.kubeletConfigKey (string), required
KubeletConfigKey 声明引用 ConfigMap 的哪个键对应于 KubeletConfiguration 结构。此字段在所有情况下都是必需的。
config.assigned.configMap.name (string), required
Name 是引用 ConfigMap 的 metadata.name。此字段在所有情况下都是必需的。
config.assigned.configMap.namespace (字符串), 必填
Namespace 是引用 ConfigMap 的 metadata.namespace。此字段在所有情况下都是必需的。
config.assigned.configMap.resourceVersion (字符串)
ResourceVersion 是引用 ConfigMap 的 metadata.ResourceVersion。此字段在 Node.Spec 中被禁止,在 Node.Status 中是必需的。
config.assigned.configMap.uid (字符串)
UID 是引用 ConfigMap 的 metadata.UID。此字段在 Node.Spec 中被禁止,在 Node.Status 中是必需的。
config.error (字符串)
错误描述了将 Spec.ConfigSource 与 Active 配置进行协调时遇到的任何问题。例如,尝试将 Spec.ConfigSource 检查点到本地 Assigned 记录、尝试检查点与 Spec.ConfigSource 关联的有效负载、尝试加载或验证 Assigned 配置等,都可能出现错误。错误可能在同步配置的不同阶段发生。较早的错误(例如下载或检查点错误)不会导致回滚到 LastKnownGood,并且可能会在 Kubelet 重试中解决。较晚的错误(例如加载或验证检查点配置)会导致回滚到 LastKnownGood。在后一种情况下,通常可以通过修复 Spec.ConfigSource 中分配的配置来解决错误。您可以在 Kubelet 日志中搜索错误消息以查找用于调试的更多信息。Error 是错误状态的人类可读描述;机器可以检查 Error 是否为空,但不应依赖 Error 文本在 Kubelet 版本之间的稳定性。
config.lastKnownGood (NodeConfigSource)
LastKnownGood 报告了节点在尝试使用 Assigned 配置时遇到错误时将回退到的检查点配置。当节点确定 Assigned 配置稳定且正确时,Assigned 配置将成为 LastKnownGood 配置。目前,这是通过从更新本地 Assigned 配置记录开始的 10 分钟浸泡期来实现的。如果 Assigned 配置在此期间结束时处于 Active 状态,它将成为 LastKnownGood。请注意,如果 Spec.ConfigSource 重置为 nil(使用本地默认值),LastKnownGood 也将立即重置为 nil,因为始终假定本地默认配置是好的。您不应该对节点确定配置稳定性和正确性的方法做出假设,因为这可能会在将来发生变化或变得可配置。
NodeConfigSource 指定节点配置的来源。除元数据外,必须且仅有一个子字段非空。此 API 自 1.22 起已弃用
config.lastKnownGood.configMap (ConfigMapNodeConfigSource)
ConfigMap 是对节点的 ConfigMap 的引用
ConfigMapNodeConfigSource 包含信息,用于将 ConfigMap 引用为节点的配置源。此 API 自 1.22 起已弃用:https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration
config.lastKnownGood.configMap.kubeletConfigKey (字符串), 必填
KubeletConfigKey 声明引用 ConfigMap 的哪个键对应于 KubeletConfiguration 结构。此字段在所有情况下都是必需的。
config.lastKnownGood.configMap.name (字符串), 必填
Name 是引用 ConfigMap 的 metadata.name。此字段在所有情况下都是必需的。
config.lastKnownGood.configMap.namespace (字符串), 必填
Namespace 是引用 ConfigMap 的 metadata.namespace。此字段在所有情况下都是必需的。
config.lastKnownGood.configMap.resourceVersion (字符串)
ResourceVersion 是引用 ConfigMap 的 metadata.ResourceVersion。此字段在 Node.Spec 中被禁止,在 Node.Status 中是必需的。
config.lastKnownGood.configMap.uid (字符串)
UID 是引用 ConfigMap 的 metadata.UID。此字段在 Node.Spec 中被禁止,在 Node.Status 中是必需的。
daemonEndpoints (NodeDaemonEndpoints)
在节点上运行的守护进程的端点。
images ([]ContainerImage)
此节点上的容器映像列表
images.names ([]字符串)
此映像已知的名称。例如 ["kubernetes.example/hyperkube:v1.0.7", "cloud-vendor.registry.example/cloud-vendor/hyperkube:v1.0.7"]
images.sizeBytes (int64)
映像的大小(以字节为单位)。
nodeInfo (NodeSystemInfo)
一组 ID/UUID 用于唯一标识节点。更多信息:https://kubernetes.ac.cn/docs/concepts/nodes/node/#info
NodeSystemInfo 是一组 ID/UUID 用于唯一标识节点。
nodeInfo.architecture (字符串), 必填
节点报告的体系结构
nodeInfo.bootID (字符串), 必填
节点报告的启动 ID。
nodeInfo.containerRuntimeVersion (字符串), 必填
节点通过运行时远程 API 报告的容器运行时版本(例如 containerd://1.4.2)。
nodeInfo.kernelVersion (字符串), 必填
节点从 'uname -r' 报告的内核版本(例如 3.16.0-0.bpo.4-amd64)。
nodeInfo.kubeProxyVersion (字符串), 必填
节点报告的 KubeProxy 版本。
nodeInfo.kubeletVersion (字符串), 必填
节点报告的 Kubelet 版本。
nodeInfo.machineID (字符串), 必填
节点报告的 MachineID。为了在集群中进行唯一的机器识别,建议使用此字段。从 man(5) machine-id 了解更多信息:http://man7.org/linux/man-pages/man5/machine-id.5.html
nodeInfo.operatingSystem (字符串), 必填
节点报告的操作系统
nodeInfo.osImage (字符串), 必填
节点从 /etc/os-release 报告的操作系统映像(例如 Debian GNU/Linux 7 (wheezy))。
nodeInfo.systemUUID (字符串), 必填
节点报告的 SystemUUID。为了进行唯一的机器识别,建议使用 MachineID。此字段特定于 Red Hat 主机 https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid
phase (字符串)
NodePhase 是最近观察到的节点的生命周期阶段。更多信息:https://kubernetes.ac.cn/docs/concepts/nodes/node/#phase 此字段从不填充,现在已弃用。
volumesAttached ([]AttachedVolume)
附加到节点的卷列表。
volumesAttached.devicePath (字符串), 必填
DevicePath 表示卷应该可用的设备路径
volumesAttached.name (字符串), 必填
附加卷的名称
volumesInUse ([]字符串)
节点正在使用(已挂载)的可附加卷列表。
NodeList
NodeList 是已向主节点注册的所有节点的完整列表。
apiVersion: v1
kind: NodeList
metadata (ListMeta)
标准列表元数据。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
items ([]Node), 必填
节点列表
操作
get
读取指定的节点
HTTP 请求
GET /api/v1/nodes/{name}
参数
name (在路径中): 字符串, 必填
节点的名称
pretty (在查询中): 字符串
响应
200 (Node): OK
401: Unauthorized
get
读取指定节点的状态
HTTP 请求
GET /api/v1/nodes/{name}/status
参数
name (在路径中): 字符串, 必填
节点的名称
pretty (在查询中): 字符串
响应
200 (Node): OK
401: Unauthorized
list
列出或监视 Node 类型的对象
HTTP 请求
GET /api/v1/nodes
参数
allowWatchBookmarks (在查询中): 布尔值
continue (在查询中): 字符串
fieldSelector (在查询中): 字符串
labelSelector (在查询中): 字符串
limit (在查询中): 整数
pretty (在查询中): 字符串
resourceVersion (在查询中): 字符串
resourceVersionMatch (在查询中): 字符串
sendInitialEvents (在查询中): 布尔值
timeoutSeconds (在查询中): 整数
watch (在查询中): 布尔值
响应
200 (NodeList): OK
401: Unauthorized
create
创建一个节点
HTTP 请求
POST /api/v1/nodes
参数
body: Node, 必填
dryRun (在查询中): 字符串
fieldManager (在查询中): 字符串
fieldValidation (在查询中): 字符串
pretty (在查询中): 字符串
响应
200 (Node): OK
201 (Node): Created
202 (Node): Accepted
401: Unauthorized
update
替换指定的节点
HTTP 请求
PUT /api/v1/nodes/{name}
参数
name (在路径中): 字符串, 必填
节点的名称
body: Node, 必填
dryRun (在查询中): 字符串
fieldManager (在查询中): 字符串
fieldValidation (在查询中): 字符串
pretty (在查询中): 字符串
响应
200 (Node): OK
201 (Node): Created
401: Unauthorized
update
替换指定节点的状态
HTTP 请求
PUT /api/v1/nodes/{name}/status
参数
name (在路径中): 字符串, 必填
节点的名称
body: Node, 必填
dryRun (在查询中): 字符串
fieldManager (在查询中): 字符串
fieldValidation (在查询中): 字符串
pretty (在查询中): 字符串
响应
200 (Node): OK
201 (Node): Created
401: Unauthorized
patch
部分更新指定的节点
HTTP 请求
PATCH /api/v1/nodes/{name}
参数
name (在路径中): 字符串, 必填
节点的名称
body: Patch, 必填
dryRun (在查询中): 字符串
fieldManager (在查询中): 字符串
fieldValidation (在查询中): 字符串
force (在查询中): 布尔值
pretty (在查询中): 字符串
响应
200 (Node): OK
201 (Node): Created
401: Unauthorized
patch
部分更新指定节点的状态
HTTP 请求
PATCH /api/v1/nodes/{name}/status
参数
name (在路径中): 字符串, 必填
节点的名称
body: Patch, 必填
dryRun (在查询中): 字符串
fieldManager (在查询中): 字符串
fieldValidation (在查询中): 字符串
force (在查询中): 布尔值
pretty (在查询中): 字符串
响应
200 (Node): OK
201 (Node): Created
401: Unauthorized
delete
删除一个节点
HTTP 请求
DELETE /api/v1/nodes/{name}
参数
name (在路径中): 字符串, 必填
节点的名称
body: DeleteOptions
dryRun (在查询中): 字符串
gracePeriodSeconds (在查询中): 整数
pretty (在查询中): 字符串
propagationPolicy (在查询中): 字符串
响应
200 (Status): OK
202 (Status): Accepted
401: Unauthorized
deletecollection
删除 Node 集合
HTTP 请求
DELETE /api/v1/nodes
参数
body: DeleteOptions
continue (在查询中): 字符串
dryRun (在查询中): 字符串
fieldSelector (在查询中): 字符串
gracePeriodSeconds (在查询中): 整数
labelSelector (在查询中): 字符串
limit (在查询中): 整数
pretty (在查询中): 字符串
propagationPolicy (在查询中): 字符串
resourceVersion (在查询中): 字符串
resourceVersionMatch (在查询中): 字符串
sendInitialEvents (在查询中): 布尔值
timeoutSeconds (在查询中): 整数
响应
200 (Status): OK
401: Unauthorized
此页面是自动生成的。
如果您打算报告此页面的问题,请在您的问题描述中提及此页面是自动生成的。修复可能需要在 Kubernetes 项目的其他地方进行。