Skip to content

# Class: Pod

Renderer.K8sApi.Pod

## Hierarchy

- `WorkloadKubeObject`

↳ Pod

## Table of contents

### Constructors

- constructor

### Properties

- apiVersion
- kind
- managedFields
- metadata
- spec
- status
- apiBase
- kind
- namespaced
- nonEditableFields

### Accessors

- selfLink

### Methods

- delete
- getAffinity
- getAffinityNumber
- getAge
- getAllContainers
- getAnnotations
- getConditions
- getContainerStatuses
- getContainers
- getFinalizers
- getIPs
- getId
- getInitContainers
- getLabels
- getLivenessProbe
- getName
- getNodeName
- getNodeSelectors
- getNs
- getOwnerRefs
- getPriorityClassName
- getProbe
- getQosClass
- getReadinessProbe
- getReason
- getResourceVersion
- getRestartsCount
- getRunningContainers
- getSearchFields
- getSecrets
- getSelectedNodeOs
- getSelectors
- getStartupProbe
- getStatus
- getStatusMessage
- getStatusPhase
- getTemplateLabels
- getTimeDiffFromNow
- getTolerations
- getVolumes
- hasIssues
- toPlainObject
- update
- create
- isJsonApiData
- isJsonApiDataList
- isKubeJsonApiListMetadata
- isKubeJsonApiMetadata
- isNonSystem
- isPartialJsonApiData
- isPartialJsonApiMetadata
- stringifyLabels

## Constructors

### constructor

• new Pod(`data`)

#### Parameters

Name | Type
--- | ---
`data` | `KubeJsonApiData`

#### Overrides

WorkloadKubeObject.constructor

## Properties

### apiVersion

• apiVersion: `string`

#### Inherited from

WorkloadKubeObject.apiVersion

### kind

• kind: `string`

#### Inherited from

WorkloadKubeObject.kind

### managedFields

• `Optional` managedFields: `any`

#### Inherited from

WorkloadKubeObject.managedFields

### metadata

• metadata: `KubeObjectMetadata`

#### Inherited from

WorkloadKubeObject.metadata

### spec

• `Optional` spec: `Object`

#### Type declaration

Name | Type
--- | ---
`activeDeadlineSeconds?` | `number`
`affinity?` | `IAffinity`
`automountServiceAccountToken?` | `boolean`
`containers` | IPodContainer[]
`dnsPolicy?` | `string`
`hostAliases?` | `Object`
`hostAliases.hostnames` | `string`[]
`hostAliases.ip` | `string`
`hostIPC?` | `boolean`
`hostNetwork?` | `boolean`
`hostPID?` | `boolean`
`hostname?` | `string`
`imagePullSecrets?` | { `name`: `string` }[]
`initContainers` | IPodContainer[]
`nodeName?` | `string`
`nodeSelector?` | `Object`
`priority?` | `number`
`priorityClassName?` | `string`
`restartPolicy?` | `string`
`schedulerName?` | `string`
`securityContext?` | `Object`
`serviceAccount` | `string`
`serviceAccountName` | `string`
`shareProcessNamespace?` | `boolean`
`subdomain?` | `string`
`terminationGracePeriodSeconds?` | `number`
`tolerations?` | { `effect?`: `string` ; `key?`: `string` ; `operator?`: `string` ; `tolerationSeconds?`: `number` ; `value?`: `string` }[]
`volumes?` | { `configMap`: { `name`: `string` } ; `emptyDir`: { `medium?`: `string` ; `sizeLimit?`: `string` } ; `name`: `string` ; `persistentVolumeClaim`: { `claimName`: `string` } ; `secret`: { `defaultMode`: `number` ; `secretName`: `string` } }[]

#### Overrides

WorkloadKubeObject.spec

### status

• `Optional` status: `Object`

#### Type declaration

Name | Type
--- | ---
`conditions` | { `lastProbeTime`: `number` ; `lastTransitionTime`: `string` ; `status`: `string` ; `type`: `string` }[]
`containerStatuses?` | IPodContainerStatus[]
`hostIP` | `string`
`initContainerStatuses?` | IPodContainerStatus[]
`phase` | `string`
`podIP` | `string`
`podIPs?` | { `ip`: `string` }[]
`qosClass?` | `string`
`reason?` | `string`
`startTime` | `string`

#### Overrides

WorkloadKubeObject.status

### apiBase

▪ `Static` apiBase: `string` = "/api/v1/pods"

### kind

▪ `Static` kind: `string` = "Pod"

#### Overrides

WorkloadKubeObject.kind

### namespaced

▪ `Static` namespaced: `boolean` = true

#### Overrides

WorkloadKubeObject.namespaced

### nonEditableFields

▪ `Static` `Protected` `Readonly` nonEditableFields: `string`[]

#### Inherited from

WorkloadKubeObject.nonEditableFields

## Accessors

### selfLink

• `get` selfLink(): `string`

#### Returns

`string`

## Methods

### delete

▸ delete(`params?`): `Promise`<KubeJsonApiData>

#### Parameters

Name | Type
--- | ---
`params?` | `JsonApiParams`<any>

#### Returns

`Promise`<KubeJsonApiData>

#### Inherited from

WorkloadKubeObject.delete

### getAffinity

▸ getAffinity(): `IAffinity`

#### Returns

`IAffinity`

#### Overrides

WorkloadKubeObject.getAffinity

### getAffinityNumber

▸ getAffinityNumber(): `number`

#### Returns

`number`

#### Inherited from

WorkloadKubeObject.getAffinityNumber

### getAge

▸ getAge(`humanize?`, `compact?`, `fromNow?`): `string` | `number`

#### Parameters

Name | Type | Default value
--- | --- | ---
`humanize` | `boolean` | true
`compact` | `boolean` | true
`fromNow` | `boolean` | false

#### Returns

`string` | `number`

#### Inherited from

WorkloadKubeObject.getAge

### getAllContainers

▸ getAllContainers(): IPodContainer[]

#### Returns

IPodContainer[]

### getAnnotations

▸ getAnnotations(`filter?`): `string`[]

#### Parameters

Name | Type | Default value
--- | --- | ---
`filter` | `boolean` | false

#### Returns

`string`[]

#### Inherited from

WorkloadKubeObject.getAnnotations

### getConditions

▸ getConditions(): { `lastProbeTime`: `number` ; `lastTransitionTime`: `string` ; `status`: `string` ; `type`: `string` }[]

#### Returns

{ `lastProbeTime`: `number` ; `lastTransitionTime`: `string` ; `status`: `string` ; `type`: `string` }[]

### getContainerStatuses

▸ getContainerStatuses(`includeInitContainers?`): IPodContainerStatus[]

#### Parameters

Name | Type | Default value
--- | --- | ---
`includeInitContainers` | `boolean` | true

#### Returns

IPodContainerStatus[]

### getContainers

▸ getContainers(): IPodContainer[]

#### Returns

IPodContainer[]

### getFinalizers

▸ getFinalizers(): `string`[]

#### Returns

`string`[]

#### Inherited from

WorkloadKubeObject.getFinalizers

### getIPs

▸ getIPs(): `string`[]

#### Returns

`string`[]

### getId

▸ getId(): `string`

#### Returns

`string`

#### Inherited from

WorkloadKubeObject.getId

### getInitContainers

▸ getInitContainers(): IPodContainer[]

#### Returns

IPodContainer[]

### getLabels

▸ getLabels(): `string`[]

#### Returns

`string`[]

#### Inherited from

WorkloadKubeObject.getLabels

### getLivenessProbe

▸ getLivenessProbe(`container`): `string`[]

#### Parameters

Name | Type
--- | ---
`container` | IPodContainer

#### Returns

`string`[]

### getName

▸ getName(): `string`

#### Returns

`string`

#### Inherited from

WorkloadKubeObject.getName

### getNodeName

▸ getNodeName(): `string`

#### Returns

`string`

### getNodeSelectors

▸ getNodeSelectors(): `string`[]

#### Returns

`string`[]

#### Overrides

WorkloadKubeObject.getNodeSelectors

### getNs

▸ getNs(): `string`

#### Returns

`string`

#### Inherited from

WorkloadKubeObject.getNs

### 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

WorkloadKubeObject.getOwnerRefs

### getPriorityClassName

▸ getPriorityClassName(): `string`

#### Returns

`string`

### getProbe

▸ getProbe(`probeData`): `string`[]

#### Parameters

Name | Type
--- | ---
`probeData` | `IContainerProbe`

#### 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

WorkloadKubeObject.getResourceVersion

### getRestartsCount

▸ getRestartsCount(): `number`

#### Returns

`number`

### getRunningContainers

▸ getRunningContainers(): IPodContainer[]

#### Returns

IPodContainer[]

### getSearchFields

▸ getSearchFields(): `string`[]

#### Returns

`string`[]

#### Inherited from

WorkloadKubeObject.getSearchFields

### getSecrets

▸ getSecrets(): `string`[]

#### Returns

`string`[]

### getSelectedNodeOs

▸ getSelectedNodeOs(): `string`

#### Returns

`string`

### getSelectors

▸ getSelectors(): `string`[]

#### Returns

`string`[]

#### Inherited from

WorkloadKubeObject.getSelectors

### getStartupProbe

▸ getStartupProbe(`container`): `string`[]

#### Parameters

Name | Type
--- | ---
`container` | IPodContainer

#### Returns

`string`[]

### getStatus

▸ getStatus(): `PodStatus`

#### Returns

`PodStatus`

### getStatusMessage

▸ getStatusMessage(): `string`

#### Returns

`string`

### getStatusPhase

▸ getStatusPhase(): `string`

#### Returns

`string`

### getTemplateLabels

▸ getTemplateLabels(): `string`[]

#### Returns

`string`[]

#### Inherited from

WorkloadKubeObject.getTemplateLabels

### getTimeDiffFromNow

▸ getTimeDiffFromNow(): `number`

#### Returns

`number`

#### Inherited from

WorkloadKubeObject.getTimeDiffFromNow

### getTolerations

▸ getTolerations(): { `effect?`: `string` ; `key?`: `string` ; `operator?`: `string` ; `tolerationSeconds?`: `number` ; `value?`: `string` }[]

#### Returns

{ `effect?`: `string` ; `key?`: `string` ; `operator?`: `string` ; `tolerationSeconds?`: `number` ; `value?`: `string` }[]

#### Overrides

WorkloadKubeObject.getTolerations

### getVolumes

▸ getVolumes(): { `configMap`: { `name`: `string` } ; `emptyDir`: { `medium?`: `string` ; `sizeLimit?`: `string` } ; `name`: `string` ; `persistentVolumeClaim`: { `claimName`: `string` } ; `secret`: { `defaultMode`: `number` ; `secretName`: `string` } }[]

#### Returns

{ `configMap`: { `name`: `string` } ; `emptyDir`: { `medium?`: `string` ; `sizeLimit?`: `string` } ; `name`: `string` ; `persistentVolumeClaim`: { `claimName`: `string` } ; `secret`: { `defaultMode`: `number` ; `secretName`: `string` } }[]

### hasIssues

▸ hasIssues(): `boolean`

#### Returns

`boolean`

### toPlainObject

▸ toPlainObject(): `object`

#### Returns

`object`

#### Inherited from

WorkloadKubeObject.toPlainObject

### update

▸ update<K>(`data`): `Promise`<K>

#### Type parameters

Name | Type
--- | ---
`K` | `K`: KubeObject<KubeObjectMetadata, any, any, K>

#### Parameters

Name | Type
--- | ---
`data` | `Partial`<K>

#### Returns

`Promise`<K>

#### Inherited from

WorkloadKubeObject.update

### create

▸ `Static` create(`data`): KubeObject<KubeObjectMetadata, any, any>

#### Parameters

Name | Type
--- | ---
`data` | `KubeJsonApiData`

#### Returns

KubeObject<KubeObjectMetadata, any, any>

#### Inherited from

WorkloadKubeObject.create

### isJsonApiData

▸ `Static` isJsonApiData(`object`): object is KubeJsonApiData

#### Parameters

Name | Type
--- | ---
`object` | `unknown`

#### Returns

object is KubeJsonApiData

#### Inherited from

WorkloadKubeObject.isJsonApiData

### 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

WorkloadKubeObject.isJsonApiDataList

### isKubeJsonApiListMetadata

▸ `Static` isKubeJsonApiListMetadata(`object`): object is KubeJsonApiListMetadata

#### Parameters

Name | Type
--- | ---
`object` | `unknown`

#### Returns

object is KubeJsonApiListMetadata

#### Inherited from

WorkloadKubeObject.isKubeJsonApiListMetadata

### isKubeJsonApiMetadata

▸ `Static` isKubeJsonApiMetadata(`object`): object is KubeJsonApiMetadata

#### Parameters

Name | Type
--- | ---
`object` | `unknown`

#### Returns

object is KubeJsonApiMetadata

#### Inherited from

WorkloadKubeObject.isKubeJsonApiMetadata

### isNonSystem

▸ `Static` isNonSystem(`item`): `boolean`

#### Parameters

Name | Type
--- | ---
`item` | KubeObject<KubeObjectMetadata, any, any> | `KubeJsonApiData`

#### Returns

`boolean`

#### Inherited from

WorkloadKubeObject.isNonSystem

### isPartialJsonApiData

▸ `Static` isPartialJsonApiData(`object`): object is Partial<KubeJsonApiData>

#### Parameters

Name | Type
--- | ---
`object` | `unknown`

#### Returns

object is Partial<KubeJsonApiData>

#### Inherited from

WorkloadKubeObject.isPartialJsonApiData

### isPartialJsonApiMetadata

▸ `Static` isPartialJsonApiMetadata(`object`): object is Partial<KubeJsonApiMetadata>

#### Parameters

Name | Type
--- | ---
`object` | `unknown`

#### Returns

object is Partial<KubeJsonApiMetadata>

#### Inherited from

WorkloadKubeObject.isPartialJsonApiMetadata

### stringifyLabels

▸ `Static` stringifyLabels(`labels?`): `string`[]

#### Parameters

Name | Type
--- | ---
`labels?` | `Object`

#### Returns

`string`[]

#### Inherited from

WorkloadKubeObject.stringifyLabels