REST Resource: namespaces.tasks

Resource: Task

Task represents a single run of a container to completion.

JSON representation
{
  "apiVersion": string,
  "kind": string,
  "metadata": {
    object (ObjectMeta)
  },
  "spec": {
    object (TaskSpec)
  },
  "status": {
    object (TaskStatus)
  }
}
Fields
apiVersion

string

Optional. APIVersion 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: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources +optional

kind

string

Optional. Kind 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: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds +optional

metadata

object (ObjectMeta)

Optional. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata +optional

spec

object (TaskSpec)

Optional. Specification of the desired behavior of an execution. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status +optional

status

object (TaskStatus)

Output only. Current status of an execution. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status +optional

TaskStatus

TaskStatus represents the status of a task of a job execution.

JSON representation
{
  "observedGeneration": integer,
  "conditions": [
    {
      object (Condition)
    }
  ],
  "index": integer,
  "startTime": string,
  "completionTime": string,
  "retried": integer,
  "lastAttemptResult": {
    object (TaskAttemptResult)
  },
  "logUri": string
}
Fields
observedGeneration

integer

Optional. The 'generation' of the execution that was last processed by the controller.

conditions[]

object (Condition)

Optional. The latest available observations of a task's current state. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ +optional

index

integer

Required. Index of the task, unique per execution, and beginning at 0.

startTime

string (Timestamp format)

Optional. Represents time when the task started to run. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. +optional

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

completionTime

string (Timestamp format)

Optional. Represents time when the task 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. +optional

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

retried

integer

Optional. The number of times this task was retried. Instances are retried when they fail up to the maxRetries limit. +optional

lastAttemptResult

object (TaskAttemptResult)

Optional. Result of the last attempt of this task. +optional

logUri

string

Optional. URI where logs for this task can be found in Cloud Console.

TaskAttemptResult

Result of a task attempt.

JSON representation
{
  "status": {
    object (Status)
  },
  "exitCode": integer
}
Fields
status

object (Status)

Optional. The status of this attempt. If the status code is OK, then the attempt succeeded.

exitCode

integer

Optional. The exit code of this attempt. This may be unset if the container was unable to exit cleanly with a code due to some other failure. See status field for possible failure details.

Methods

get

Get information about a task.

list

List tasks.