文档首页> 云容器实例 CCI> API参考> 数据结构> 响应数据结构(废弃)
更新时间:2022-05-06 GMT+08:00
分享

响应数据结构(废弃)

表1 Pod响应参数

参数

参数类型

描述

kind

String

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.

apiVersion

String

Versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values.

metadata

metadata object

-

spec

spec object

-

status

status object

-

表2 PodList响应参数

参数

参数类型

描述

kind

String

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.

apiVersion

String

Versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values.

metadata

metadata object

-

items

Array of Pod objects

List of pods.

表3 PodTemplate响应参数

参数

参数类型

描述

kind

String

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.

apiVersion

String

Versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values.

metadata

metadata object

-

template

template object

-

表4 PodTemplateList响应参数

参数

参数类型

描述

kind

String

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.

apiVersion

String

Versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values.

metadata

metadata object

-

items

items object

List of pod templates.

表5 items字段数据结构说明

参数

参数类型

描述

kind

String

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.

apiVersion

String

Versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values.

metadata

metadata object

-

spec

spec object

-

status

status object

-

表6 status字段数据结构说明

参数

参数类型

描述

phase

String

Current condition of the pod.

conditions

conditions object

Current service state of the pod.

message

String

A human readable message indicating details about why the pod is in this condition.

reason

String

A brief CamelCase message indicating details about why the pod is in this state. e.g. 'OutOfDisk'

hostIP

String

IP address of the host to which the pod is assigned. Empty if not yet scheduled.

podIP

String

IP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated.

startTime

String

RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod.

containerStatuses

containerStatuses object

The list has one entry per container in the manifest. Each entry is currently the output of container inspect.

表7 conditions字段数据结构说明

参数

参数类型

描述

type

String

Type of the condition. Currently only Ready.

status

String

Status of the condition. Can be True, False, or Unknown.

lastProbeTime

String

Last time we probed the condition.

lastTransitionTime

String

Last time the condition transitioned from one status to another.

reason

String

Unique, one-word, CamelCase reason for the condition's last transition.

message

String

Human-readable message indicating details about last transition.

表8 containerStatuses字段数据结构说明

参数

参数类型

描述

name

String

This must be a DNS_LABEL. Each container in a pod must have a unique name. Cannot be updated.

state

state/lastState object

-

lastState

state/lastState object

-

ready

Boolean

A flag indicating whether the container has passed its readiness probe.

restartCount

Integer

The number of times the container has been restarted, currently based on the number of dead containers that have not yet been removed. Note that this is calculated from dead containers. However, those containers are subject to garbage collection. This value will get capped at 5 by GC.

image

String

Image that the container is running.

imageID

String

ID of the container's image.

containerID

String

Container's ID in the format 'docker://'.

表9 state/lastState字段数据结构说明

参数

参数类型

描述

waiting

waiting object

-

running

running object

-

terminated

terminated object

-

表10 waiting字段数据结构说明

参数

参数类型

描述

reason

String

(Brief) reason the container is not yet running.

message

String

Message regarding why the container is not yet running.

表11 running字段数据结构说明

参数

参数类型

描述

startedAt

String

Time at which the container was last (re-)started.

表12 terminated字段数据结构说明

参数

参数类型

描述

exitCode

Integer

Exit status from the last termination of the container.

signal

Integer

Signal from the last termination of the container.

reason

String

(Brief) reason from the last termination of the container.

message

String

Message regarding the last termination of the container.

startedAt

String

Time at which previous execution of the container started.

finishedAt

String

Time at which the container last terminated.

containerID

String

Container's ID in the format 'docker://'.

表13 metadata字段数据结构说明

参数

参数类型

描述

selfLink

String

SelfLink is a URL representing this object. Populated by the system. Read-only.

resourceVersion

String

String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only.

表14 items字段数据结构说明

参数

参数类型

描述

kind

String

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.

apiVersion

String

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.

metadata

metadata object

-

spec

spec object

-

status

status object

-

表15 metadata字段数据结构说明

参数

参数类型

描述

name

String

Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated.

clusterName

String

The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.

initializers

initializers object

An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user.

generateName

String

GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different from the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.

If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).

Applied only if Name is not specified.

namespace

String

Namespace defines the space within each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty. Must be a DNS_LABEL. Cannot be updated.

selfLink

String

SelfLink is a URL representing this object. Populated by the system. Read-only.

uid

String

UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations. Populated by the system. Read-only.

resourceVersion

String

An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources. Populated by the system. Read-only. Value must be treated as opaque by clients.

generation

Integer

A sequence number representing a specific generation of the desired state. Currently only implemented by replication controllers. Populated by the system. Read-only.

creationTimestamp

String

CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists.

deletionTimestamp

String

DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource will be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. Once the resource is deleted in the API, the Kubelet will send a hard termination signal to the container. If not set, graceful deletion of the object has not been requested. Populated by the system when a graceful deletion is requested. Read-only.

deletionGracePeriodSeconds

Integer

Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.

labels

Map[string]string

Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services.

Annotations

Map[string]string

Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects.

ownerReferences

ownerReferences object

List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.

finalizers

Array of strings

Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.

表16 spec字段数据结构说明

参数

参数类型

描述

replicas

Integer

Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1.

selector

Object

Selector is a label query over pods that should match the Replicas count. If Selector is empty, it is defaulted to the labels present on the Pod template. Label keys and values that must match in order to be controlled by this replication controller, if empty defaulted to labels on Pod template.

minReadySeconds

Integer

Minimum number of seconds for which a newly created pod should be ready without any of its containers crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)

template

template object

-

表17 status字段数据结构说明

参数

参数类型

描述

replicas

Integer

Replicas is the most recently observed number of replicas.

availableReplicas

Integer

The number of available replicas (ready for at least minReadySeconds) for this replication controller.

readyReplicas

Integer

The number of ready replicas for this replication controller.

fullyLabeledReplicas

Integer

The number of pods that have labels matching the labels of the pod template of the replication controller.

conditions

ReplicationControllerCondition object

Represents the latest available observations of a replication controller's current state.

observedGeneration

Integer

ObservedGeneration reflects the generation of the most recently observed replication controller.

表18 initializers字段数据结构说明

参数

参数类型

描述

pending

pending object

Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients.

result

result object

If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion.

表19 pending字段数据结构说明

参数

参数类型

描述

name

String

name of the process that is responsible for initializing this object.

表20 result字段数据结构说明

参数

参数类型

描述

apiVersion

String

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.

code

Integer

Suggested HTTP return code for this status, 0 if not set.

details

details object

Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.

kind

String

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.

message

String

A human-readable description of the status of this operation.

metadata

metadata object

Standard list metadata.

reason

String

A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.

status

String

Status of the operation. One of: "Success" or "Failure".

表21 details字段数据结构说明

参数

参数类型

描述

causes

causes object

The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.

group

String

The group attribute of the resource associated with the status StatusReason.

kind

String

The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind.

name

String

The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).

retryAfterSeconds

Integer

If specified, the time in seconds before the operation should be retried.

uid

String

UID of the resource. (when there is a single resource which can be described).

表22 metadata字段数据结构说明

参数

参数类型

描述

resourceVersion

String

String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only.

selfLink

String

SelfLink is a URL representing this object. Populated by the system. Read-only.

表23 causes字段数据结构说明

参数

参数类型

描述

field

String

The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional. Examples: "name" - the field "name" on the current resource "items[0].name" - the field "name" on the first array entry in "items"

message

String

A human-readable description of the cause of the error. This field may be presented as-is to a reader.

reason

String

A machine-readable description of the cause of the error. If this value is empty there is no information available.

表24 ownerReferences字段数据结构说明

参数

参数类型

描述

apiVersion

String

API version of the referent.

blockOwnerDeletion

Boolean

If true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Default to false. To set this field, a user needs "delete" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.

kind

String

Kind of the referent.

name

String

Name of the referent.

uid

String

UID of the referent.

controller

Boolean

If true, this reference points to the managing controller.

表25 template字段数据结构说明

参数

参数类型

描述

metadata

metadata object

-

spec

spec object

-

表26 spec字段数据结构说明

参数

参数类型

描述

volumes

-

Not supported now.

containers

containers object

List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated.

restartPolicy

String

Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always.

activeDeadlineSeconds

Integer

Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer.

dnsPolicy

String

Set DNS policy for containers within the pod. One of 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst".

serviceAccountName

String

ServiceAccountName is the name of the ServiceAccount to use to run this pod.

serviceAccount

String

DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.

nodeName

String

NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements.

hostNetwork

Boolean

Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false.

hostPID

Boolean

Use the host's pid namespace. Optional: Default to false.

hostIPC

Boolean

Use the host's ipc namespace. Optional: Default to false.

securityContext

securityContext object

-

imagePullSecrets

imagePullSecrets object

ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use.

表27 containers字段数据结构说明

参数

参数类型

描述

name

String

Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.

image

String

Container image name.

command

Array of strings

Entrypoint array. Not executed within a shell. The container image's entrypoint is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, for example, $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated.

args

Array of strings

Arguments to the entrypoint. The container image's cmd is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, for example, $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated.

workingDir

String

Container's working directory. Defaults to Container's default. Defaults to image's default. Cannot be updated.

ports

ports object

List of ports to expose from the container. Cannot be updated.

env

env object

List of environment variables to set in the container. Cannot be updated.

resources

resources object

Resources represents the minimum resources the volume should have.

volumeMounts

-

Not supported now.

livenessProbe

livenessProbe object

-

readinessProbe

livenessProbe object

-

lifecycle

lifecycle object

-

terminationMessagePath

String

Path at which the file to which the container's termination message will be written is mounted into the container's file system. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated.

imagePullPolicy

String

Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if the latest tag is specified, or IfNotPresent otherwise. Cannot be updated.

securityContext

securityContext object

-

stdin

Boolean

Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.

stdinOnce

Boolean

Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true, the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container process that reads from stdin will never receive an EOF. Default is false.

tty

Boolean

Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.

表28 securityContext字段数据结构说明

参数

参数类型

描述

seLinuxOptions

seLinuxOptions object

-

runAsUser

Integer

The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.

runAsNonRoot

Boolean

Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.

supplementalGroups

Array of integers

A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container.

fsGroup

Integer

A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:

The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw.

表29 imagePullSecrets字段数据结构说明

参数

参数类型

描述

name

String

Name of the referent.

表30 hostPath字段数据结构说明

参数

参数类型

描述

path

String

Path of the directory on the host.

表31 gitRepo字段数据结构说明

参数

参数类型

描述

repository

String

Repository URL

revision

String

Commit hash for the specified revision.

表32 secret字段数据结构说明

参数

参数类型

描述

secretName

String

SecretName is the name of a secret in the pod's namespace.

表33 ports字段数据结构说明

参数

参数类型

描述

name

String

If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.

hostPort

Integer

Number of the port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.

containerPort

Integer

Number of the port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536.

protocol

String

Protocol for port. Must be UDP or TCP. Defaults to "TCP".

hostIP

String

What host IP to bind the external port to.

表34 env字段数据结构说明

参数

参数类型

描述

name

String

Name of the environment variable. Must be a C_IDENTIFIER.

value

String

Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, for example, $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".

valueFrom

valueFrom object

-

表35 resources字段数据结构说明

参数

参数类型

描述

limits

Object

Limits describes the maximum amount of compute resources allowed.

requests

Object

Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value.

表36 livenessProbe字段数据结构说明

参数

参数类型

描述

exec

exec object

-

httpGet

httpGet object

-

tcpSocket

tcpSocket object

-

initialDelaySeconds

Integer

Number of seconds after the container has started before liveness probes are initiated.

timeoutSeconds

Integer

Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1.

periodSeconds

Integer

How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.

successThreshold

Integer

Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1.

failureThreshold

Integer

Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.

表37 lifecycle字段数据结构说明

参数

参数类型

描述

postStart

postStart/preStop object

-

preStop

postStart/preStop object

-

表38 securityContext字段数据结构说明

参数

参数类型

描述

capabilities

capabilities object

-

privileged

Boolean

Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Default to false.

seLinuxOptions

seLinuxOptions object

-

runAsUser

Integer

The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.

runAsNonRoot

Boolean

Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.

表39 seLinuxOptions字段数据结构说明

参数

参数类型

描述

user

String

User is a SELinux user label that applies to the container.

role

String

Role is a SELinux role label that applies to the container.

type

String

Type is a SELinux type label that applies to the container.

level

String

Level is SELinux level label that applies to the container.

表40 items字段数据结构说明

参数

参数类型

描述

path

String

Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'

fieldRef

fieldRef object

-

表41 valueFrom字段数据结构说明

参数

参数类型

描述

fieldRef

fieldRef object

-

resourceFieldRef

resourceFieldRef object

Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.

表42 exec字段数据结构说明

参数

参数类型

描述

command

Array of strings

Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply executed, it is not run inside a shell, so traditional shell instructions ('|', etc) do not work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.

表43 httpGet字段数据结构说明

参数

参数类型

描述

path

String

Path to access on the HTTP server.

port

String

Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.

host

String

Host name to connect to, defaults to the pod IP.

scheme

String

Scheme to use for connecting to the host. Defaults to HTTP.

表44 tcpSocket字段数据结构说明

参数

参数类型

描述

port

String

Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.

表45 postStart/preStop字段数据结构说明

参数

参数类型

描述

exec

exec object

-

httpGet

httpGet object

-

tcpSocket

tcpSocket object

TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported.

表46 capabilities字段数据结构说明

参数

参数类型

描述

add

add object

Added capabilities

drop

add object

Removed capabilities

表47 fieldRef字段数据结构说明

参数

参数类型

描述

apiVersion

String

Version of the schema the FieldPath is written in terms of, defaults to "v1"

fieldPath

String

Path of the field to select in the specified API version.

表48 resourceFieldRef 字段数据结构说明

参数

参数类型

描述

containerName

String

Container name: required for volumes, optional for env vars.

resource

String

Required: resource to select.

divisor

Integer

Specifies the output format of the exposed resources, defaults to "1".

表49 add字段数据结构说明

参数

参数类型

描述

name

String

name is the name of the resource.

namespaced

Boolean

namespaced indicates if a resource is namespaced or not.

Default: false.

kind

String

kind is the kind for the resource.

表50 metadata字段数据结构说明

参数

参数类型

描述

resourceVersion

String

String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only.

selfLink

String

SelfLink is a URL representing this object. Populated by the system. Read-only.

表51 ReplicationControllerCondition字段数据结构说明

参数

参数类型

描述

lastTransitionTime

String

The last time the condition transitioned from one status to another.

message

String

A human readable message indicating details about the transition.

reason

String

The reason for the condition's last transition.

status

String

Status of the condition, one of True, False, Unknown.

type

String

Type of replication controller condition.

表52 status v1 Core字段数据结构说明

参数

参数类型

描述

apiVersion

String

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.

code

Integer

Suggested HTTP return code for this status, 0 if not set

details

StatusDetails object

Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.

kind

String

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

message

String

A human-readable description of the status of this operation

metadata

ListMeta v1 meta object

Standard list metadata.

reason

reason object

A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.

status

String

Status of the operation. One of: "Success" or "Failure".

表53 StatusDetails v1 meta 数据结构说明

参数

参数类型

描述

causes

Array of StatusCause object

The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.

group

String

The group attribute of the resource associated with the status StatusReason.

kind

String

The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind

name

String

The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).

retryAfterSeconds

Integer

If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.

uid

String

UID of the resource. (when there is a single resource which can be described)

表54 StatusCause v1 meta数据结构说明

参数

参数类型

描述

field

String

The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional. Examples: "name" - the field "name" on the current resource "items[0].name" - the field "name" on the first array entry in "items"

message

String

A human-readable description of the cause of the error. This field may be presented as-is to a reader.

reason

StatusCause Type object

A machine-readable description of the cause of the error. If this value is empty there is no information available.

表55 StatusCause reason字段值范围说明

描述

FieldValueNotFound

CauseTypeFieldValueNotFound is used to report failure to find a requested value.(e.g. looking up an ID)

FieldValueRequired

CauseTypeFieldValueRequired is used to report required values that are not provided (e.g. empty strings, null values, or empty arrays).

FieldValueDuplicate

CauseTypeFieldValueDuplicate is used to report collisions of values that must be unique (e.g. unique IDs).

FieldValueInvalid

CauseTypeFieldValueInvalid is used to report malformed values (e.g. failed regex match).

FieldValueNotSupported

CauseTypeFieldValueNotSupported is used to report valid (as per formatting rules) values that cannot be handled (e.g. an enumerated string).

UnexpectedServerResponse

CauseTypeUnexpectedServerResponse is used to report when the server responded to the client without the expected return type. The presence of this cause indicates the error may be due to an intervening proxy or the server software malfunctioning.

表56 ListMeta v1 meta数据结构说明

参数

参数类型

描述

continue

String

continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response

resourceVersion

String

String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only

selfLink

String

SelfLink is a URL representing this object. Populated by the system. Read-only

表57 Status v1中reason值说明

名称

描述

StatusReasonUnknown

“”

StatusReasonUnknown means the server has declined to indicate a specific reason. The details field may contain other information about this error.

Status code 500

StatusReasonUnauthorized

Unauthorized

StatusReasonUnauthorized means the server can be reached and understood the request, but requires the user to present appropriate authorization credentials (identified by the WWW-Authenticate header) in order for the action to be completed. If the user has specified credentials on the request, the server considers them insufficient.

Status code 401

StatusReasonForbidden

Forbidden

StatusReasonForbidden means the server can be reached and understood the request, but refuses to take any further action. It is the result of the server being configured to deny access for some reason to the requested resource by the client.

Details (optional):

"kind" string - the kind attribute of the forbidden resource on some operations may differ from the requested

resource. "id" string - the identifier of the forbidden resource

Status code 403

StatusReasonNotFound

NotFound

StatusReasonNotFound means one or more resources required for this operation could not be found.

Details (optional):

"kind" string - the kind attribute of the missing resource on some operations may differ from the requested resource.

"id" string - the identifier of the missing resource

Status code 404

StatusReasonAlreadyExists

AlreadyExists

StatusReasonAlreadyExists means the resource you are creating already exists.

Details (optional):

"kind" string - the kind attribute of the conflicting resource

"id" string - the identifier of the conflicting resource

Status code 409

StatusReasonConflict

Conflict

StatusReasonConflict means the requested operation cannot be completed due to a conflict in the operation. The client may need to alter the request. Each resource may define custom details that indicate the nature of the conflict.

Status code 409

StatusReasonGone

Gone

StatusReasonGone means the item is no longer available at the server and no forwarding address is known.

Status code 410

StatusReasonInvalid

Invalid

StatusReasonInvalid means the requested create or update operation cannot be completed due to invalid data provided as part of the request. The client may need to alter the request. When set, the client may use the StatusDetailsmessage field as a summary of the issues encountered.

Details (optional):

"kind" string - the kind attribute of the invalid resource

"id" string - the identifier of the invalid resource

"causes" - one or more StatusCause entries indicating the data in the provided resource that was invalid. The code, message, and field attributes will be set.

Status code 422

StatusReasonServerTimeout

ServerTimeout

StatusReasonServerTimeout means the server can be reached and understood the request, but cannot complete the action in a reasonable time. The client should retry the request. This is probably due to temporary server load or a transient communication issue with another server. Status code 500 is used because the HTTP spec provides no suitableserver-requested client retry and the 5xx class represents actionable errors.

Details (optional):

"kind" string - the kind attribute of the resource being acted on.

"id" string - the operation that is being attempted.

"retryAfterSeconds" int32 - the number of seconds before the operation should be retried

Status code 500

StatusReasonTimeout

Timeout

StatusReasonTimeout means that the request could not be completed within the given time. Clients can get this response only when they specified a timeout param in the request, or if the server cannot complete the operation within a reasonable amount of time. The request might succeed with an increased value of timeout param. The client *should*wait at least the number of seconds specified by the retryAfterSeconds field. Details (optional):"retryAfterSeconds" int32 - the number of seconds before the operation should be retried

Status code 504

StatusReasonBadRequest

BadRequest

StatusReasonBadRequest means that the request itself was invalid, because the request does not make any sense, for example deleting a read-only object. This is different from StatusReasonInvalid above which indicates that the API call could possibly succeed, but the data was invalid. API calls that return BadRequest can never succeed.

StatusReasonMethodNotAllowed

MethodNotAllowed

StatusReasonMethodNotAllowed means that the action the client attempted to perform on the resource was not supported by the code - for instance, attempting to delete a resource that can only be created. API calls that return MethodNotAllowed can never succeed.

StatusReasonInternalError

InternalError

StatusReasonInternalError indicates that an internal error occurred, it is unexpected and the outcome of the call is unknown.

Details (optional):

"causes" - The original error

Status code 500

StatusReasonExpired

Expired

StatusReasonExpired indicates that the request is invalid because the content you are requesting has expired and is no longer available. It is typically associated with watches that cannot be serviced.

Status code 410 (gone)

StatusReasonServiceUnavailable

ServiceUnavailable

StatusReasonServiceUnavailable means that the request itself was valid, but the requested service is unavailable at this time. Retrying the request after some time might succeed.

Status code 503

分享:

    相关文档

    相关产品

close