Class: Pod#
Hierarchy#
KubeObject
<NamespaceScopedMetadata
,PodStatus
,PodSpec
>
↳ Pod
Table of contents#
Constructors#
Properties#
Accessors#
Methods#
- delete
- getAffinity
- getAffinityNumber
- getAge
- getAllContainers
- getAnnotations
- getConditions
- getContainerStatuses
- getContainers
- getCreationTimestamp
- getFinalizers
- getIPs
- getId
- getInitContainers
- getLabels
- getLivenessProbe
- getName
- getNodeName
- getNodeSelectors
- getNs
- getOwnerRefs
- getPriorityClassName
- getQosClass
- getReadinessProbe
- getReason
- getResourceVersion
- getRestartsCount
- getRunningContainers
- getScopedName
- getSearchFields
- getSecrets
- getSelectedNodeOs
- getStartupProbe
- getStatus
- getStatusMessage
- getStatusPhase
- getTimeDiffFromNow
- getTolerations
- getVolumes
- hasIssues
- patch
- toPlainObject
- update
- create
- isJsonApiData
- isJsonApiDataList
- isKubeJsonApiListMetadata
- isKubeJsonApiMetadata
- isNonSystem
- isPartialJsonApiData
- isPartialJsonApiMetadata
- stringifyLabels
Constructors#
constructor#
• new Pod(data
)
Parameters#
Name | Type |
---|---|
data |
KubeJsonApiData <NamespaceScopedMetadata , PodStatus , PodSpec > |
Inherited from#
Properties#
apiVersion#
• apiVersion: string
Inherited from#
kind#
• kind: string
Inherited from#
metadata#
• metadata: NamespaceScopedMetadata
Inherited from#
spec#
• spec: PodSpec
Inherited from#
status#
• Optional
status: PodStatus
Inherited from#
apiBase#
▪ Static
apiBase: string
= "/api/v1/pods"
Overrides#
kind#
▪ Static
kind: string
= "Pod"
Overrides#
namespaced#
▪ Static
namespaced: boolean
= true
Overrides#
Accessors#
selfLink#
• get
selfLink(): string
Returns#
string
Inherited from#
KubeObject.selfLink
Methods#
delete#
▸ delete(params?
): Promise
<KubeJsonApiData
<KubeJsonApiObjectMetadata
<KubeObjectScope
>, unknown
, unknown
>>
deprecated
use KubeApi.delete instead
Parameters#
Name | Type |
---|---|
params? |
object |
Returns#
Promise
<KubeJsonApiData
<KubeJsonApiObjectMetadata
<KubeObjectScope
>, unknown
, unknown
>>
Inherited from#
getAffinity#
▸ getAffinity(): Affinity
Returns#
Affinity
getAffinityNumber#
▸ getAffinityNumber(): number
Returns#
number
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#
getAllContainers#
▸ getAllContainers(): IPodContainer
[]
Returns#
getAnnotations#
▸ getAnnotations(filter?
): string
[]
Parameters#
Name | Type | Default value |
---|---|---|
filter |
boolean |
false |
Returns#
string
[]
Inherited from#
getConditions#
▸ getConditions(): PodCondition
[]
Returns#
PodCondition
[]
getContainerStatuses#
▸ getContainerStatuses(includeInitContainers?
): IPodContainerStatus
[]
Parameters#
Name | Type | Default value |
---|---|---|
includeInitContainers |
boolean |
true |
Returns#
getContainers#
▸ getContainers(): IPodContainer
[]
Returns#
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#
getIPs#
▸ getIPs(): string
[]
Returns#
string
[]
getId#
▸ getId(): string
Returns#
string
Inherited from#
getInitContainers#
▸ getInitContainers(): IPodContainer
[]
Returns#
getLabels#
▸ getLabels(): string
[]
Returns#
string
[]
Inherited from#
getLivenessProbe#
▸ getLivenessProbe(container
): string
[]
Parameters#
Name | Type |
---|---|
container |
IPodContainer |
Returns#
string
[]
getName#
▸ getName(): string
Returns#
string
Inherited from#
getNodeName#
▸ getNodeName(): undefined
| string
Returns#
undefined
| string
getNodeSelectors#
▸ getNodeSelectors(): string
[]
Returns#
string
[]
getNs#
▸ getNs(): string
Returns#
string
Inherited from#
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#
getPriorityClassName#
▸ getPriorityClassName(): string
Returns#
string
getQosClass#
▸ getQosClass(): string
Returns#
string
getReadinessProbe#
▸ getReadinessProbe(container
): string
[]
Parameters#
Name | Type |
---|---|
container |
IPodContainer |
Returns#
string
[]
getReason#
▸ getReason(): string
Returns#
string
getResourceVersion#
▸ getResourceVersion(): string
Returns#
string
Inherited from#
getRestartsCount#
▸ getRestartsCount(): number
Returns#
number
getRunningContainers#
▸ getRunningContainers(): IPodContainer
[]
Returns#
getScopedName#
▸ getScopedName(): string
Returns#
string
Inherited from#
getSearchFields#
▸ getSearchFields(): string
[]
Returns#
string
[]
Inherited from#
getSecrets#
▸ getSecrets(): string
[]
Returns#
string
[]
getSelectedNodeOs#
▸ getSelectedNodeOs(): undefined
| string
Returns#
undefined
| string
getStartupProbe#
▸ getStartupProbe(container
): string
[]
Parameters#
Name | Type |
---|---|
container |
IPodContainer |
Returns#
string
[]
getStatus#
▸ getStatus(): PodStatusPhase
Returns#
PodStatusPhase
getStatusMessage#
▸ getStatusMessage(): string
Returns#
string
getStatusPhase#
▸ getStatusPhase(): undefined
| string
Returns#
undefined
| string
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#
getTolerations#
▸ getTolerations(): Toleration
[]
Returns#
Toleration
[]
getVolumes#
▸ getVolumes(): PodSpecVolume
[]
Returns#
PodSpecVolume
[]
hasIssues#
▸ hasIssues(): boolean
Returns#
boolean
patch#
▸ patch(patch
): Promise
<null
| KubeJsonApiData
<KubeJsonApiObjectMetadata
<KubeObjectScope
>, unknown
, unknown
>>
deprecated
use KubeApi.patch instead
Parameters#
Name | Type |
---|---|
patch |
Patch |
Returns#
Promise
<null
| KubeJsonApiData
<KubeJsonApiObjectMetadata
<KubeObjectScope
>, unknown
, unknown
>>
Inherited from#
toPlainObject#
▸ toPlainObject(): JsonObject
Returns#
JsonObject
Inherited from#
update#
▸ update(data
): Promise
<null
| KubeJsonApiData
<KubeJsonApiObjectMetadata
<KubeObjectScope
>, unknown
, unknown
>>
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 <Pod > |
Returns#
Promise
<null
| KubeJsonApiData
<KubeJsonApiObjectMetadata
<KubeObjectScope
>, unknown
, unknown
>>
Inherited from#
create#
▸ Static
create<Metadata
, Status
, Spec
>(data
): KubeObject
<Metadata
, Status
, Spec
>
Type parameters#
Name | Type |
---|---|
Metadata |
extends KubeObjectMetadata <KubeObjectScope > = KubeObjectMetadata <KubeObjectScope > |
Status |
unknown |
Spec |
unknown |
Parameters#
Name | Type |
---|---|
data |
KubeJsonApiData <Metadata , Status , Spec > |
Returns#
KubeObject
<Metadata
, Status
, Spec
>
Inherited from#
isJsonApiData#
▸ Static
isJsonApiData(object
): object is KubeJsonApiData<KubeJsonApiObjectMetadata<KubeObjectScope>, unknown, unknown>
Parameters#
Name | Type |
---|---|
object |
unknown |
Returns#
object is KubeJsonApiData<KubeJsonApiObjectMetadata<KubeObjectScope>, unknown, unknown>
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 KubeJsonApiObjectMetadata<KubeObjectScope>
Parameters#
Name | Type |
---|---|
object |
unknown |
Returns#
object is KubeJsonApiObjectMetadata<KubeObjectScope>
Inherited from#
KubeObject.isKubeJsonApiMetadata
isNonSystem#
▸ Static
isNonSystem(item
): boolean
Parameters#
Name | Type |
---|---|
item |
KubeJsonApiData <KubeJsonApiObjectMetadata <KubeObjectScope >, unknown , unknown > | KubeObject <KubeObjectMetadata <KubeObjectScope >, unknown , unknown > |
Returns#
boolean
Inherited from#
isPartialJsonApiData#
▸ Static
isPartialJsonApiData(object
): object is Partial<KubeJsonApiData<KubeJsonApiObjectMetadata<KubeObjectScope>, unknown, unknown>>
Parameters#
Name | Type |
---|---|
object |
unknown |
Returns#
object is Partial<KubeJsonApiData<KubeJsonApiObjectMetadata<KubeObjectScope>, unknown, unknown>>
Inherited from#
KubeObject.isPartialJsonApiData
isPartialJsonApiMetadata#
▸ Static
isPartialJsonApiMetadata(object
): object is Partial<KubeJsonApiObjectMetadata<KubeObjectScope>>
Parameters#
Name | Type |
---|---|
object |
unknown |
Returns#
object is Partial<KubeJsonApiObjectMetadata<KubeObjectScope>>
Inherited from#
KubeObject.isPartialJsonApiMetadata
stringifyLabels#
▸ Static
stringifyLabels(labels?
): string
[]
Parameters#
Name | Type |
---|---|
labels? |
Partial <Record <string , string >> |
Returns#
string
[]