Skip to main content

Workloads Models

V1ControllerRevision

  • ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
dataanyData is the serialized representation of the state.
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
revisionnumberRevision indicates the revision of the state represented by Data.
metadataV1ObjectMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.AppsV1Api);

const body: k8s.V1ControllerRevision = {
metadata: { name: 'example' },
};
const res = await api.createNamespacedControllerRevision({ namespace: 'default', body });
console.log(res.metadata?.name);

Used by: AppsV1Api.createNamespacedControllerRevision · AppsV1Api.patchNamespacedControllerRevision · AppsV1Api.readNamespacedControllerRevision

V1ControllerRevisionList

  • ControllerRevisionList is a resource containing a list of ControllerRevision objects.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
itemsV1ControllerRevision[]Items is the list of ControllerRevisions
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ListMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.AppsV1Api);

const res: k8s.V1ControllerRevisionList = await api.listNamespacedControllerRevision({ namespace: 'default' });
for (const item of res.items) {
console.log(item.metadata?.name);
}

Used by: AppsV1Api.listControllerRevisionForAllNamespaces · AppsV1Api.listNamespacedControllerRevision

V1CronJob

  • CronJob represents the configuration of a single cron job.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ObjectMeta
specV1CronJobSpec
statusV1CronJobStatus

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.BatchV1Api);

const body: k8s.V1CronJob = {
metadata: { name: 'example' },
spec: { /* ... */ },
};
const res = await api.createNamespacedCronJob({ namespace: 'default', body });
console.log(res.metadata?.name);

Used by: BatchV1Api.createNamespacedCronJob · BatchV1Api.readNamespacedCronJob · BatchV1Api.readNamespacedCronJobStatus

V1CronJobList

  • CronJobList is a collection of cron jobs.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
itemsV1CronJob[]items is the list of CronJobs.
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ListMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.BatchV1Api);

const res: k8s.V1CronJobList = await api.listNamespacedCronJob({ namespace: 'default' });
for (const item of res.items) {
console.log(item.metadata?.name);
}

Used by: BatchV1Api.listCronJobForAllNamespaces · BatchV1Api.listNamespacedCronJob

V1CronJobSpec

  • CronJobSpec describes how the job execution will look like and when it will actually run.

Source

PropertyTypeDescription
concurrencyPolicystringSpecifies how to treat concurrent executions of a Job. Valid values are: - "Allow" (default): allows CronJobs to run concurrently; - "Forbid": forbids concurrent runs, skipping next run if...
failedJobsHistoryLimitnumberThe number of failed finished jobs to retain. Value must be non-negative integer. Defaults to 1.
schedulestringThe schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
startingDeadlineSecondsnumberOptional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.
successfulJobsHistoryLimitnumberThe number of successful finished jobs to retain. Value must be non-negative integer. Defaults to 3.
suspendbooleanThis flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.
timeZonestringThe time zone name for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. If not specified, this will default to the time zone of the kube-controller-manager...
jobTemplateV1JobTemplateSpec

V1CronJobStatus

  • CronJobStatus represents the current state of a cron job.

Source

PropertyTypeDescription
activeV1ObjectReference[]A list of pointers to currently running jobs.
lastScheduleTimeDateInformation when was the last time the job was successfully scheduled.
lastSuccessfulTimeDateInformation when was the last time the job successfully completed.

V1DaemonSet

  • DaemonSet represents the configuration of a daemon set.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ObjectMeta
specV1DaemonSetSpec
statusV1DaemonSetStatus

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.AppsV1Api);

const body: k8s.V1DaemonSet = {
metadata: { name: 'example' },
spec: { /* ... */ },
};
const res = await api.createNamespacedDaemonSet({ namespace: 'default', body });
console.log(res.metadata?.name);

Used by: AppsV1Api.createNamespacedDaemonSet · AppsV1Api.readNamespacedDaemonSet · AppsV1Api.readNamespacedDaemonSetStatus

V1DaemonSetCondition

  • DaemonSetCondition describes the state of a DaemonSet at a certain point.

Source

PropertyTypeDescription
lastTransitionTimeDateLast time the condition transitioned from one status to another.
messagestringA human readable message indicating details about the transition.
reasonstringThe reason for the condition's last transition.
statusstringStatus of the condition, one of True, False, Unknown.
typestringType of DaemonSet condition.

V1DaemonSetList

  • DaemonSetList is a collection of daemon sets.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
itemsV1DaemonSet[]A list of daemon sets.
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ListMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.AppsV1Api);

const res: k8s.V1DaemonSetList = await api.listNamespacedDaemonSet({ namespace: 'default' });
for (const item of res.items) {
console.log(item.metadata?.name);
}

Used by: AppsV1Api.listDaemonSetForAllNamespaces · AppsV1Api.listNamespacedDaemonSet

V1DaemonSetSpec

  • DaemonSetSpec is the specification of a daemon set.

Source

PropertyTypeDescription
minReadySecondsnumberThe minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered...
revisionHistoryLimitnumberThe number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.
selectorV1LabelSelector
templateV1PodTemplateSpec
updateStrategyV1DaemonSetUpdateStrategy

V1DaemonSetStatus

  • DaemonSetStatus represents the current status of a daemon set.

Source

PropertyTypeDescription
collisionCountnumberCount of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.
conditionsV1DaemonSetCondition[]Represents the latest available observations of a DaemonSet's current state.
currentNumberSchedulednumberThe number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
desiredNumberSchedulednumberThe total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
numberAvailablenumberThe number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds)
numberMisschedulednumberThe number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
numberReadynumbernumberReady is the number of nodes that should be running the daemon pod and have one or more of the daemon pod running with a Ready Condition.
numberUnavailablenumberThe number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds)
observedGenerationnumberThe most recent generation observed by the daemon set controller.
updatedNumberSchedulednumberThe total number of nodes that are running updated daemon pod

V1DaemonSetUpdateStrategy

  • DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.

Source

PropertyTypeDescription
typestringType of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate.
rollingUpdateV1RollingUpdateDaemonSet

V1Deployment

  • Deployment enables declarative updates for Pods and ReplicaSets.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ObjectMeta
specV1DeploymentSpec
statusV1DeploymentStatus

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.AppsV1Api);

const body: k8s.V1Deployment = {
metadata: { name: 'example' },
spec: { /* ... */ },
};
const res = await api.createNamespacedDeployment({ namespace: 'default', body });
console.log(res.metadata?.name);

Used by: AppsV1Api.createNamespacedDeployment · AppsV1Api.readNamespacedDeployment · AppsV1Api.readNamespacedDeploymentStatus

V1DeploymentCondition

  • DeploymentCondition describes the state of a deployment at a certain point.

Source

PropertyTypeDescription
lastTransitionTimeDateLast time the condition transitioned from one status to another.
lastUpdateTimeDateThe last time this condition was updated.
messagestringA human readable message indicating details about the transition.
reasonstringThe reason for the condition's last transition.
statusstringStatus of the condition, one of True, False, Unknown.
typestringType of deployment condition.

V1DeploymentList

  • DeploymentList is a list of Deployments.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
itemsV1Deployment[]Items is the list of Deployments.
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ListMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.AppsV1Api);

const res: k8s.V1DeploymentList = await api.listNamespacedDeployment({ namespace: 'default' });
for (const item of res.items) {
console.log(item.metadata?.name);
}

Used by: AppsV1Api.listDeploymentForAllNamespaces · AppsV1Api.listNamespacedDeployment

V1DeploymentSpec

  • DeploymentSpec is the specification of the desired behavior of the Deployment.

Source

PropertyTypeDescription
minReadySecondsnumberMinimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as...
pausedbooleanIndicates that the deployment is paused.
progressDeadlineSecondsnumberThe maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a...
replicasnumberNumber of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.
revisionHistoryLimitnumberThe number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.
selectorV1LabelSelector
strategyV1DeploymentStrategy
templateV1PodTemplateSpec

V1DeploymentStatus

  • DeploymentStatus is the most recently observed status of the Deployment.

Source

PropertyTypeDescription
availableReplicasnumberTotal number of available non-terminating pods (ready for at least minReadySeconds) targeted by this deployment.
collisionCountnumberCount of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.
conditionsV1DeploymentCondition[]Represents the latest available observations of a deployment's current state.
observedGenerationnumberThe generation observed by the deployment controller.
readyReplicasnumberTotal number of non-terminating pods targeted by this Deployment with a Ready Condition.
replicasnumberTotal number of non-terminating pods targeted by this deployment (their labels match the selector).
terminatingReplicasnumberTotal number of terminating pods targeted by this deployment. Terminating pods have a non-null .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase. This is a...
unavailableReplicasnumberTotal number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that...
updatedReplicasnumberTotal number of non-terminating pods targeted by this deployment that have the desired template spec.

V1DeploymentStrategy

  • DeploymentStrategy describes how to replace existing pods with new ones.

Source

PropertyTypeDescription
typestringType of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
rollingUpdateV1RollingUpdateDeployment

V1HorizontalPodAutoscaler

  • configuration of a horizontal pod autoscaler.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ObjectMeta
specV1HorizontalPodAutoscalerSpec
statusV1HorizontalPodAutoscalerStatus

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.AutoscalingV1Api);

const body: k8s.V1HorizontalPodAutoscaler = {
metadata: { name: 'example' },
spec: { /* ... */ },
};
const res = await api.createNamespacedHorizontalPodAutoscaler({ namespace: 'default', body });
console.log(res.metadata?.name);

Used by: AutoscalingV1Api.createNamespacedHorizontalPodAutoscaler · AutoscalingV1Api.readNamespacedHorizontalPodAutoscaler · AutoscalingV1Api.readNamespacedHorizontalPodAutoscalerStatus

V1HorizontalPodAutoscalerList

  • list of horizontal pod autoscaler objects.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
itemsV1HorizontalPodAutoscaler[]items is the list of horizontal pod autoscaler objects.
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ListMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.AutoscalingV1Api);

const res: k8s.V1HorizontalPodAutoscalerList = await api.listNamespacedHorizontalPodAutoscaler({ namespace: 'default' });
for (const item of res.items) {
console.log(item.metadata?.name);
}

Used by: AutoscalingV1Api.listHorizontalPodAutoscalerForAllNamespaces · AutoscalingV1Api.listNamespacedHorizontalPodAutoscaler

V1HorizontalPodAutoscalerSpec

  • specification of a horizontal pod autoscaler.

Source

PropertyTypeDescription
maxReplicasnumbermaxReplicas is the upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
minReplicasnumberminReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is...
targetCPUUtilizationPercentagenumbertargetCPUUtilizationPercentage is the target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.
scaleTargetRefV1CrossVersionObjectReference

V1HorizontalPodAutoscalerStatus

  • current status of a horizontal pod autoscaler

Source

PropertyTypeDescription
currentCPUUtilizationPercentagenumbercurrentCPUUtilizationPercentage is the current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested...
currentReplicasnumbercurrentReplicas is the current number of replicas of pods managed by this autoscaler.
desiredReplicasnumberdesiredReplicas is the desired number of replicas of pods managed by this autoscaler.
lastScaleTimeDatelastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed.
observedGenerationnumberobservedGeneration is the most recent generation observed by this autoscaler.

V1Job

  • Job represents the configuration of a single job.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ObjectMeta
specV1JobSpec
statusV1JobStatus

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.BatchV1Api);

const body: k8s.V1Job = {
metadata: { name: 'example' },
spec: { /* ... */ },
};
const res = await api.createNamespacedJob({ namespace: 'default', body });
console.log(res.metadata?.name);

Used by: BatchV1Api.createNamespacedJob · BatchV1Api.readNamespacedJob · BatchV1Api.readNamespacedJobStatus

V1JobCondition

  • JobCondition describes current state of a job.

Source

PropertyTypeDescription
lastProbeTimeDateLast time the condition was checked.
lastTransitionTimeDateLast time the condition transit from one status to another.
messagestringHuman readable message indicating details about last transition.
reasonstring(brief) reason for the condition's last transition.
statusstringStatus of the condition, one of True, False, Unknown.
typestringType of job condition, Complete or Failed.

V1JobList

  • JobList is a collection of jobs.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
itemsV1Job[]items is the list of Jobs.
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ListMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.BatchV1Api);

const res: k8s.V1JobList = await api.listNamespacedJob({ namespace: 'default' });
for (const item of res.items) {
console.log(item.metadata?.name);
}

Used by: BatchV1Api.listJobForAllNamespaces · BatchV1Api.listNamespacedJob

V1JobSpec

  • JobSpec describes how the job execution will look like.

Source

PropertyTypeDescription
activeDeadlineSecondsnumberSpecifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at...
backoffLimitnumberSpecifies the number of retries before marking this job failed. Defaults to 6, unless backoffLimitPerIndex (only Indexed Job) is specified. When backoffLimitPerIndex is specified, backoffLimit...
backoffLimitPerIndexnumberSpecifies the limit for the number of retries within an index before marking this index as failed. When enabled the number of failures per index is kept in the pod's...
completionModestringcompletionMode specifies how Pod completions are tracked. It can be NonIndexed (default) or Indexed. NonIndexed means that the Job is considered complete when there have been .spec.completions...
completionsnumberSpecifies the desired number of successfully finished pods the job should be run with. Setting to null means that the success of any pod signals the success of all pods, and allows parallelism to...
managedBystringManagedBy field indicates the controller that manages a Job. The k8s Job controller reconciles jobs which don't have this field at all or the field value is the reserved string...
manualSelectorbooleanmanualSelector controls generation of pod labels and pod selectors. Leave manualSelector unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this...
maxFailedIndexesnumberSpecifies the maximal number of failed indexes before marking the Job as failed, when backoffLimitPerIndex is set. Once the number of failed indexes exceeds this number the entire Job is marked as...
parallelismnumberSpecifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions -...
podReplacementPolicystringpodReplacementPolicy specifies when to create replacement Pods. Possible values are: - TerminatingOrFailed means that we recreate pods when they are terminating (has a metadata.deletionTimestamp)...
suspendbooleansuspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation...
ttlSecondsAfterFinishednumberttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to...
podFailurePolicyV1PodFailurePolicy
selectorV1LabelSelector
successPolicyV1SuccessPolicy
templateV1PodTemplateSpec

V1JobStatus

  • JobStatus represents the current state of a Job.

Source

PropertyTypeDescription
activenumberThe number of pending and running pods which are not terminating (without a deletionTimestamp). The value is zero for finished jobs.
completedIndexesstringcompletedIndexes holds the completed indexes when .spec.completionMode = "Indexed" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in...
completionTimeDateRepresents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is...
conditionsV1JobCondition[]The latest available observations of an object's current state. When a Job fails, one of the conditions will have type "Failed" and status true. When a Job is suspended, one of the conditions will...
failednumberThe number of pods which reached phase Failed. The value increases monotonically.
failedIndexesstringFailedIndexes holds the failed indexes when spec.backoffLimitPerIndex is set. The indexes are represented in the text format analogous as for the completedIndexes field, ie. they are kept as...
readynumberThe number of active pods which have a Ready condition and are not terminating (without a deletionTimestamp).
startTimeDateRepresents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every...
succeedednumberThe number of pods which reached phase Succeeded. The value increases monotonically for a given spec. However, it may decrease in reaction to scale down of elastic indexed jobs.
terminatingnumberThe number of pods which are terminating (in phase Pending or Running and have a deletionTimestamp). This field is beta-level. The job controller populates the field when the feature gate...
uncountedTerminatedPodsV1UncountedTerminatedPods

V1JobTemplateSpec

  • JobTemplateSpec describes the data a Job should have when created from a template

Source

PropertyTypeDescription
metadataV1ObjectMeta
specV1JobSpec

V1ReplicaSet

  • ReplicaSet ensures that a specified number of pod replicas are running at any given time.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ObjectMeta
specV1ReplicaSetSpec
statusV1ReplicaSetStatus

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.AppsV1Api);

const body: k8s.V1ReplicaSet = {
metadata: { name: 'example' },
spec: { /* ... */ },
};
const res = await api.createNamespacedReplicaSet({ namespace: 'default', body });
console.log(res.metadata?.name);

Used by: AppsV1Api.createNamespacedReplicaSet · AppsV1Api.readNamespacedReplicaSet · AppsV1Api.readNamespacedReplicaSetStatus

V1ReplicaSetCondition

  • ReplicaSetCondition describes the state of a replica set at a certain point.

Source

PropertyTypeDescription
lastTransitionTimeDateThe last time the condition transitioned from one status to another.
messagestringA human readable message indicating details about the transition.
reasonstringThe reason for the condition's last transition.
statusstringStatus of the condition, one of True, False, Unknown.
typestringType of replica set condition.

V1ReplicaSetList

  • ReplicaSetList is a collection of ReplicaSets.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
itemsV1ReplicaSet[]List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ListMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.AppsV1Api);

const res: k8s.V1ReplicaSetList = await api.listNamespacedReplicaSet({ namespace: 'default' });
for (const item of res.items) {
console.log(item.metadata?.name);
}

Used by: AppsV1Api.listNamespacedReplicaSet · AppsV1Api.listReplicaSetForAllNamespaces

V1ReplicaSetSpec

  • ReplicaSetSpec is the specification of a ReplicaSet.

Source

PropertyTypeDescription
minReadySecondsnumberMinimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as...
replicasnumberReplicas is the number of desired pods. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info:...
selectorV1LabelSelector
templateV1PodTemplateSpec

V1ReplicaSetStatus

  • ReplicaSetStatus represents the current status of a ReplicaSet.

Source

PropertyTypeDescription
availableReplicasnumberThe number of available non-terminating pods (ready for at least minReadySeconds) for this replica set.
conditionsV1ReplicaSetCondition[]Represents the latest available observations of a replica set's current state.
fullyLabeledReplicasnumberThe number of non-terminating pods that have labels matching the labels of the pod template of the replicaset.
observedGenerationnumberObservedGeneration reflects the generation of the most recently observed ReplicaSet.
readyReplicasnumberThe number of non-terminating pods targeted by this ReplicaSet with a Ready Condition.
replicasnumberReplicas is the most recently observed number of non-terminating pods. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset
terminatingReplicasnumberThe number of terminating pods for this replica set. Terminating pods have a non-null .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase. This is a beta field...

V1Scale

  • Scale represents a scaling request for a resource.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ObjectMeta
specV1ScaleSpec
statusV1ScaleStatus

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const body: k8s.V1Scale = {
metadata: { name: 'example' },
spec: { /* ... */ },
};
const res = await api.patchNamespacedReplicationControllerScale({ namespace: 'default', body });
console.log(res.metadata?.name);

Used by: AppsV1Api.patchNamespacedDeploymentScale · AppsV1Api.readNamespacedDeploymentScale · AppsV1Api.replaceNamespacedDeploymentScale · CoreV1Api.patchNamespacedReplicationControllerScale · CoreV1Api.readNamespacedReplicationControllerScale · CoreV1Api.replaceNamespacedReplicationControllerScale

V1ScaleIOPersistentVolumeSource

  • ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume

Source

PropertyTypeDescription
fsTypestringfsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs"
gatewaystringgateway is the host address of the ScaleIO API Gateway.
protectionDomainstringprotectionDomain is the name of the ScaleIO Protection Domain for the configured storage.
readOnlybooleanreadOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
sslEnabledbooleansslEnabled is the flag to enable/disable SSL communication with Gateway, default false
storageModestringstorageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.
storagePoolstringstoragePool is the ScaleIO Storage Pool associated with the protection domain.
systemstringsystem is the name of the storage system as configured in ScaleIO.
volumeNamestringvolumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source.
secretRefV1SecretReference

V1ScaleIOVolumeSource

  • ScaleIOVolumeSource represents a persistent ScaleIO volume

Source

PropertyTypeDescription
fsTypestringfsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs".
gatewaystringgateway is the host address of the ScaleIO API Gateway.
protectionDomainstringprotectionDomain is the name of the ScaleIO Protection Domain for the configured storage.
readOnlybooleanreadOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
sslEnabledbooleansslEnabled Flag enable/disable SSL communication with Gateway, default false
storageModestringstorageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.
storagePoolstringstoragePool is the ScaleIO Storage Pool associated with the protection domain.
systemstringsystem is the name of the storage system as configured in ScaleIO.
volumeNamestringvolumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source.
secretRefV1LocalObjectReference

V1ScaleSpec

  • ScaleSpec describes the attributes of a scale subresource.

Source

PropertyTypeDescription
replicasnumberreplicas is the desired number of instances for the scaled object.

V1ScaleStatus

  • ScaleStatus represents the current status of a scale subresource.

Source

PropertyTypeDescription
replicasnumberreplicas is the actual number of observed instances of the scaled object.
selectorstringselector is the label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the...

V1StatefulSet

  • StatefulSet represents a set of pods with consistent identities. Identities are defined as: - Network: A single stable DNS and hostname. - Storage: As many VolumeClaims as requested. The StatefulSet guarantees that a given network identity will always map to the same storage identity.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ObjectMeta
specV1StatefulSetSpec
statusV1StatefulSetStatus

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.AppsV1Api);

const body: k8s.V1StatefulSet = {
metadata: { name: 'example' },
spec: { /* ... */ },
};
const res = await api.createNamespacedStatefulSet({ namespace: 'default', body });
console.log(res.metadata?.name);

Used by: AppsV1Api.createNamespacedStatefulSet · AppsV1Api.readNamespacedStatefulSet · AppsV1Api.readNamespacedStatefulSetStatus

V1StatefulSetCondition

  • StatefulSetCondition describes the state of a statefulset at a certain point.

Source

PropertyTypeDescription
lastTransitionTimeDateLast time the condition transitioned from one status to another.
messagestringA human readable message indicating details about the transition.
reasonstringThe reason for the condition's last transition.
statusstringStatus of the condition, one of True, False, Unknown.
typestringType of statefulset condition.

V1StatefulSetList

  • StatefulSetList is a collection of StatefulSets.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
itemsV1StatefulSet[]Items is the list of stateful sets.
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ListMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.AppsV1Api);

const res: k8s.V1StatefulSetList = await api.listNamespacedStatefulSet({ namespace: 'default' });
for (const item of res.items) {
console.log(item.metadata?.name);
}

Used by: AppsV1Api.listNamespacedStatefulSet · AppsV1Api.listStatefulSetForAllNamespaces

V1StatefulSetOrdinals

  • StatefulSetOrdinals describes the policy used for replica ordinal assignment in this StatefulSet.

Source

PropertyTypeDescription
startnumberstart is the number representing the first replica's index. It may be used to number replicas from an alternate index (eg: 1-indexed) over the default 0-indexed names, or to orchestrate progressive...

V1StatefulSetPersistentVolumeClaimRetentionPolicy

  • StatefulSetPersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from the StatefulSet VolumeClaimTemplates.

Source

PropertyTypeDescription
whenDeletedstringWhenDeleted specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is deleted. The default policy of Retain causes PVCs to not be affected by StatefulSet...
whenScaledstringWhenScaled specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is scaled down. The default policy of Retain causes PVCs to not be affected by a...

V1StatefulSetSpec

  • A StatefulSetSpec is the specification of a StatefulSet.

Source

PropertyTypeDescription
minReadySecondsnumberMinimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to be considered available. Defaults to 0 (pod will be considered available as...
podManagementPolicystringpodManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is OrderedReady, where pods are created in...
replicasnumberreplicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent...
revisionHistoryLimitnumberrevisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently...
serviceNamestringserviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames...
volumeClaimTemplatesV1PersistentVolumeClaim[]volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of...
ordinalsV1StatefulSetOrdinals
persistentVolumeClaimRetentionPolicyV1StatefulSetPersistentVolumeClaimRetentionPolicy
selectorV1LabelSelector
templateV1PodTemplateSpec
updateStrategyV1StatefulSetUpdateStrategy

V1StatefulSetStatus

  • StatefulSetStatus represents the current state of a StatefulSet.

Source

PropertyTypeDescription
availableReplicasnumberTotal number of available pods (ready for at least minReadySeconds) targeted by this statefulset.
collisionCountnumbercollisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest...
conditionsV1StatefulSetCondition[]Represents the latest available observations of a statefulset's current state.
currentReplicasnumbercurrentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision.
currentRevisionstringcurrentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).
observedGenerationnumberobservedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server.
readyReplicasnumberreadyReplicas is the number of pods created for this StatefulSet with a Ready Condition.
replicasnumberreplicas is the number of Pods created by the StatefulSet controller.
updateRevisionstringupdateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)
updatedReplicasnumberupdatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision.

V1StatefulSetUpdateStrategy

  • StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.

Source

PropertyTypeDescription
typestringType indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate.
rollingUpdateV1RollingUpdateStatefulSetStrategy