Patch a Node
const url = 'https://example.com/apis/nodus.dev/v1/nodes/example';const options = { method: 'PATCH', headers: {'Content-Type': 'application/merge-patch+json'}, body: '{}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/apis/nodus.dev/v1/nodes/example \ --header 'Content-Type: application/merge-patch+json' \ --data '{}'Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The object’s name.
Query Parameters
Section titled “ Query Parameters ”Header Parameters
Section titled “ Header Parameters ”Request Bodyrequired
Section titled “ Request Bodyrequired ”object
Example generated
{}Responses
Section titled “ Responses ”OK
Node is a customer host enrolled into a Pool with an EnrollmentToken. It is read-only except for metadata.labels and the nodus.dev/drain-requested-at annotation; DELETE unenrolls the host.
object
object
object
object
object
object
object
NodeStatus is what nodusd reports about the host.
object
NodeAllocatable is the placeable share of the host.
object
CPU is the free CPU count.
GPUs counts free GPUs per accelerator model.
object
MemoryMiB is the free memory in MiB.
CloudAccount is the CloudAccount the host was observed in, when it was enrolled from one.
Conditions carries Ready.
object
DrainedTime is when the current drain began.
NodeInventory is the host’s hardware and software.
object
CPU is the host’s CPU count.
DiskGiB is the host’s free disk in GiB.
GPUs are the host’s GPUs.
NodeGPU is one device on the host.
object
Driver is the GPU driver version.
MemoryMiB is the GPU’s memory in MiB.
Accelerator model, “h100-sxm-80g”
MemoryMiB is the host’s memory in MiB.
NodusdVersion is the nodusd release on the host.
OS is the host’s operating system.
LastHeartbeatTime is nodusd’s latest heartbeat.
Pool is the Pool the host belongs to.
Running counts the Nodus-scheduled attempts on the host.
NodeUtilization is the host’s latest utilization.
object
GPUPercent is the GPU busy share, in percent.
MemoryPercent is the memory in use, in percent.
Example generated
{ "apiVersion": "example", "kind": "example", "metadata": { "annotations": { "additionalProperty": "example" }, "creationTimestamp": "example", "deletionGracePeriodSeconds": 1, "deletionTimestamp": "example", "finalizers": [ "example" ], "generateName": "example", "generation": 1, "labels": { "additionalProperty": "example" }, "managedFields": [ { "apiVersion": "example", "fieldsType": "example", "fieldsV1": { "additionalProperty": "example" }, "manager": "example", "operation": "example", "subresource": "example", "time": "example" } ], "name": "example", "namespace": "example", "ownerReferences": [ { "apiVersion": "example", "blockOwnerDeletion": true, "controller": true, "kind": "example", "name": "example", "uid": "example" } ], "resourceVersion": "example", "selfLink": "example", "uid": "example" }, "status": { "allocatable": { "cpu": 1, "gpus": { "additionalProperty": 1 }, "memoryMiB": 1 }, "cloudAccount": "example", "conditions": [ { "lastTransitionTime": "example", "message": "example", "observedGeneration": 1, "reason": "example", "status": "example", "type": "example" } ], "drainedTime": "example", "inventory": { "cpu": 1, "diskGiB": 1, "gpus": [ { "driver": "example", "memoryMiB": 1, "type": "example" } ], "memoryMiB": 1, "nodusdVersion": "example", "os": "example" }, "lastHeartbeatTime": "example", "pool": "example", "running": 1, "utilization": { "gpuPercent": 1, "memoryPercent": 1 } }}default
Section titled “ default ”An error: a metav1.Status whose reason is a registered code.
Status is the error body of every API response: a Kubernetes metav1.Status (so kubectl and client-go understand it) plus three top-level extensions that those clients ignore (ADR-028).
object
object
object
Docs is the URL of the code’s docs page.
Fix says what to do next, for example a CLI command or the field to change.
object
object
RequestID identifies the request in logs and support tickets.
Example generated
{ "apiVersion": "example", "code": 1, "details": { "causes": [ { "field": "example", "message": "example", "reason": "example" } ], "group": "example", "kind": "example", "name": "example", "retryAfterSeconds": 1, "uid": "example" }, "docs": "example", "fix": "example", "kind": "example", "message": "example", "metadata": { "continue": "example", "remainingItemCount": 1, "resourceVersion": "example", "selfLink": "example", "shardInfo": { "selector": "example" } }, "reason": "example", "requestId": "example", "status": "example"}