Class: Node#
Hierarchy#
↳ Node
Table of contents#
Constructors#
Properties#
Accessors#
Methods#
- delete
- getActiveConditions
- getAge
- getAnnotations
- getConditions
- getCpuCapacity
- getCreationTimestamp
- getFinalizers
- getId
- getKubeletVersion
- getLabels
- getMemoryCapacity
- getName
- getNodeConditionText
- getNs
- getOperatingSystem
- getOwnerRefs
- getResourceVersion
- getRoleLabelItems
- getRoleLabels
- getSearchFields
- getTaints
- getTimeDiffFromNow
- getWarningConditions
- isMasterNode
- isUnschedulable
- patch
- toPlainObject
- update
- create
- isJsonApiData
- isJsonApiDataList
- isKubeJsonApiListMetadata
- isKubeJsonApiMetadata
- isNonSystem
- isPartialJsonApiData
- isPartialJsonApiMetadata
- stringifyLabels
Constructors#
constructor#
• new Node(data
)
Parameters#
Name | Type |
---|---|
data |
KubeJsonApiData |
Inherited from#
Properties#
apiVersion#
• apiVersion: string
Inherited from#
kind#
• kind: string
Inherited from#
managedFields#
• Optional
managedFields: any
Inherited from#
metadata#
• metadata: KubeObjectMetadata
Inherited from#
spec#
• spec: Object
Type declaration#
Name | Type |
---|---|
externalID? |
string |
podCIDR? |
string |
podCIDRs? |
string [] |
providerID? |
string |
taints? |
NodeTaint [] |
unschedulable? |
boolean |
Inherited from#
status#
• status: Object
Type declaration#
Name | Type |
---|---|
addresses? |
{ address : string ; type : string }[] |
allocatable? |
Object |
allocatable.cpu |
string |
allocatable.ephemeral-storage |
string |
allocatable.hugepages-1Gi |
string |
allocatable.hugepages-2Mi |
string |
allocatable.memory |
string |
allocatable.pods |
string |
capacity? |
Object |
capacity.cpu |
string |
capacity.ephemeral-storage |
string |
capacity.hugepages-1Gi |
string |
capacity.hugepages-2Mi |
string |
capacity.memory |
string |
capacity.pods |
string |
conditions? |
NodeCondition [] |
daemonEndpoints? |
Object |
daemonEndpoints.kubeletEndpoint |
Object |
daemonEndpoints.kubeletEndpoint.Port |
number |
images? |
{ names : string [] ; sizeBytes? : number }[] |
nodeInfo? |
Object |
nodeInfo.architecture |
string |
nodeInfo.bootID |
string |
nodeInfo.containerRuntimeVersion |
string |
nodeInfo.kernelVersion |
string |
nodeInfo.kubeProxyVersion |
string |
nodeInfo.kubeletVersion |
string |
nodeInfo.machineID |
string |
nodeInfo.operatingSystem |
string |
nodeInfo.osImage |
string |
nodeInfo.systemUUID |
string |
volumesAttached? |
{ devicePath : string ; name : string }[] |
volumesInUse? |
string [] |
Inherited from#
apiBase#
▪ Static
apiBase: string
= "/api/v1/nodes"
Inherited from#
kind#
▪ Static
kind: string
= "Node"
Inherited from#
namespaced#
▪ Static
namespaced: boolean
= false
Inherited from#
Accessors#
selfLink#
• get
selfLink(): string
Returns#
string
Methods#
delete#
▸ delete(params?
): Promise
<KubeJsonApiData
>
deprecated
use KubeApi.delete instead
Parameters#
Name | Type |
---|---|
params? |
JsonApiParams <any > |
Returns#
Promise
<KubeJsonApiData
>
Inherited from#
getActiveConditions#
▸ getActiveConditions(): NodeCondition
[]
Returns#
NodeCondition
[]
getAge#
▸ getAge(humanize?
, compact?
, fromNow?
): string
| number
deprecated
This function computes a new "now" on every call might cause subtle issues if called multiple times
NOTE: this function also is not reactive to updates in the current time so it should not be used for renderering
Parameters#
Name | Type | Default value |
---|---|---|
humanize |
boolean |
true |
compact |
boolean |
true |
fromNow |
boolean |
false |
Returns#
string
| number
Inherited from#
getAnnotations#
▸ getAnnotations(filter?
): string
[]
Parameters#
Name | Type | Default value |
---|---|---|
filter |
boolean |
false |
Returns#
string
[]
Inherited from#
getConditions#
▸ getConditions(): NodeCondition
[]
Returns#
NodeCondition
[]
getCpuCapacity#
▸ getCpuCapacity(): number
Returns#
number
getCreationTimestamp#
▸ getCreationTimestamp(): number
This function computes the number of milliseconds from the UNIX EPOCH to the creation timestamp of this object.
Returns#
number
Inherited from#
KubeObject.getCreationTimestamp
getFinalizers#
▸ getFinalizers(): string
[]
Returns#
string
[]
Inherited from#
getId#
▸ getId(): string
Returns#
string
Inherited from#
getKubeletVersion#
▸ getKubeletVersion(): string
Returns#
string
getLabels#
▸ getLabels(): string
[]
Returns#
string
[]
Inherited from#
getMemoryCapacity#
▸ getMemoryCapacity(): number
Returns#
number
getName#
▸ getName(): string
Returns#
string
Inherited from#
getNodeConditionText#
▸ getNodeConditionText(): string
Returns the concatination of all current condition types which have a status
of "True"
Returns#
string
getNs#
▸ getNs(): string
Returns#
string
Inherited from#
getOperatingSystem#
▸ getOperatingSystem(): string
Returns#
string
getOwnerRefs#
▸ getOwnerRefs(): { apiVersion
: string
; blockOwnerDeletion
: boolean
; controller
: boolean
; kind
: string
; name
: string
; namespace
: string
; uid
: string
}[]
Returns#
{ apiVersion
: string
; blockOwnerDeletion
: boolean
; controller
: boolean
; kind
: string
; name
: string
; namespace
: string
; uid
: string
}[]
Inherited from#
getResourceVersion#
▸ getResourceVersion(): string
Returns#
string
Inherited from#
getRoleLabelItems#
▸ getRoleLabelItems(): string
[]
Returns#
string
[]
getRoleLabels#
▸ getRoleLabels(): string
Returns#
string
getSearchFields#
▸ getSearchFields(): string
[]
Returns#
string
[]
Inherited from#
getTaints#
▸ getTaints(): NodeTaint
[]
Returns#
NodeTaint
[]
getTimeDiffFromNow#
▸ getTimeDiffFromNow(): number
deprecated
This function computes a new "now" on every call which might cause subtle issues if called multiple times
NOTE: Generally you can use getCreationTimestamp
instead.
Returns#
number
Inherited from#
getWarningConditions#
▸ getWarningConditions(): NodeCondition
[]
Returns#
NodeCondition
[]
isMasterNode#
▸ isMasterNode(): boolean
Returns#
boolean
isUnschedulable#
▸ isUnschedulable(): boolean
Returns#
boolean
patch#
▸ patch(patch
): Promise
<KubeJsonApiData
>
deprecated
use KubeApi.patch instead
Parameters#
Name | Type |
---|---|
patch |
Patch |
Returns#
Promise
<KubeJsonApiData
>
Inherited from#
toPlainObject#
▸ toPlainObject(): object
Returns#
object
Inherited from#
update#
▸ update(data
): Promise
<KubeJsonApiData
>
Perform a full update (or more specifically a replace)
Note: this is brittle if data
is not actually partial (but instead whole).
As fields such as resourceVersion
will probably out of date. This is a
common race condition.
deprecated
use KubeApi.update instead
Parameters#
Name | Type |
---|---|
data |
Partial <Node > |
Returns#
Promise
<KubeJsonApiData
>
Inherited from#
create#
▸ Static
create(data
): KubeObject
<KubeObjectMetadata
, any
, any
>
Parameters#
Name | Type |
---|---|
data |
KubeJsonApiData |
Returns#
KubeObject
<KubeObjectMetadata
, any
, any
>
Inherited from#
isJsonApiData#
▸ Static
isJsonApiData(object
): object is KubeJsonApiData
Parameters#
Name | Type |
---|---|
object |
unknown |
Returns#
object is KubeJsonApiData
Inherited from#
isJsonApiDataList#
▸ Static
isJsonApiDataList<T
>(object
, verifyItem
): object is KubeJsonApiDataList<T>
Type parameters#
Name |
---|
T |
Parameters#
Name | Type |
---|---|
object |
unknown |
verifyItem |
(val : unknown ) => val is T |
Returns#
object is KubeJsonApiDataList<T>
Inherited from#
isKubeJsonApiListMetadata#
▸ Static
isKubeJsonApiListMetadata(object
): object is KubeJsonApiListMetadata
Parameters#
Name | Type |
---|---|
object |
unknown |
Returns#
object is KubeJsonApiListMetadata
Inherited from#
KubeObject.isKubeJsonApiListMetadata
isKubeJsonApiMetadata#
▸ Static
isKubeJsonApiMetadata(object
): object is KubeJsonApiMetadata
Parameters#
Name | Type |
---|---|
object |
unknown |
Returns#
object is KubeJsonApiMetadata
Inherited from#
KubeObject.isKubeJsonApiMetadata
isNonSystem#
▸ Static
isNonSystem(item
): boolean
Parameters#
Name | Type |
---|---|
item |
KubeObject <KubeObjectMetadata , any , any > | KubeJsonApiData |
Returns#
boolean
Inherited from#
isPartialJsonApiData#
▸ Static
isPartialJsonApiData(object
): object is Partial<KubeJsonApiData>
Parameters#
Name | Type |
---|---|
object |
unknown |
Returns#
object is Partial<KubeJsonApiData>
Inherited from#
KubeObject.isPartialJsonApiData
isPartialJsonApiMetadata#
▸ Static
isPartialJsonApiMetadata(object
): object is Partial<KubeJsonApiMetadata>
Parameters#
Name | Type |
---|---|
object |
unknown |
Returns#
object is Partial<KubeJsonApiMetadata>
Inherited from#
KubeObject.isPartialJsonApiMetadata
stringifyLabels#
▸ Static
stringifyLabels(labels?
): string
[]
Parameters#
Name | Type |
---|---|
labels? |
Object |
Returns#
string
[]