云容器引擎 CCE云容器引擎 CCE

计算
弹性云服务器 ECS
裸金属服务器 BMS
云手机 CPH
专属主机 DeH
弹性伸缩 AS
镜像服务 IMS
函数工作流 FunctionGraph
云耀云服务器 HECS
VR云渲游平台 CVR
特惠算力专区
存储
对象存储服务 OBS
云硬盘 EVS
云备份 CBR
弹性文件服务 SFS
存储容灾服务 SDRS
云硬盘备份 VBS
云服务器备份 CSBS
数据快递服务 DES
专属企业存储服务
云存储网关 CSG
专属分布式存储服务 DSS
CDN与智能边缘
内容分发网络 CDN
智能边缘云 IEC
智能边缘小站 IES
智能边缘平台 IEF
人工智能
AI开发平台ModelArts
华为HiLens
图引擎服务 GES
图像识别 Image
文字识别 OCR
自然语言处理 NLP
内容审核 Moderation
图像搜索 ImageSearch
医疗智能体 EIHealth
园区智能体 CampusGo
企业级AI应用开发专业套件 ModelArts Pro
人脸识别服务 FRS
对话机器人服务 CBS
视频分析服务 VAS
语音交互服务 SIS
知识图谱 KG
人证核身服务 IVS
IoT物联网
设备接入 IoTDA
设备管理 IoTDM(联通用户专用)
全球SIM联接 GSL
IoT开发者服务
IoT数据分析
车联网服务 IoV
路网数字化服务 DRIS
IoT边缘 IoTEdge
设备发放 IoTDP
开发与运维
软件开发平台 DevCloud
项目管理 ProjectMan
代码托管 CodeHub
流水线 CloudPipeline
代码检查 CodeCheck
编译构建 CloudBuild
部署 CloudDeploy
云测 CloudTest
发布 CloudRelease
移动应用测试 MobileAPPTest
CloudIDE
Classroom
开源镜像站 Mirrors
应用魔方 AppCube
云性能测试服务 CPTS
应用管理与运维平台 ServiceStage
云应用引擎 CAE
视频
实时音视频 SparkRTC
视频直播 Live
视频点播 VOD
媒体处理 MPC
视频接入服务 VIS
管理与监管
统一身份认证服务 IAM
消息通知服务 SMN
云监控服务 CES
应用运维管理 AOM
应用性能管理 APM
云日志服务 LTS
云审计服务 CTS
标签管理服务 TMS
资源管理服务 RMS
应用身份管理服务 OneAccess
区块链
区块链服务 BCS
可信跨链服务 TCS
智能协作
IdeaHub
开发者工具
SDK开发指南
API签名指南
DevStar
HCloud CLI
Terraform
Ansible
API问题定位指导
云生态
云市场
合作伙伴中心
华为云培训中心
其他
管理控制台
消息中心
产品价格详情
系统权限
我的凭证
客户关联华为云合作伙伴须知
公共问题
宽限期保留期
奖励推广计划
活动
容器
云容器引擎 CCE
云容器实例 CCI
容器镜像服务 SWR
应用编排服务 AOS
多云容器平台 MCP
基因容器 GCS
容器洞察引擎 CIE
云原生服务中心 OSC
容器批量计算 BCE
容器交付流水线 ContainerOps
应用服务网格 ASM
网络
虚拟私有云 VPC
弹性公网IP EIP
弹性负载均衡 ELB
NAT网关 NAT
云专线 DC
虚拟专用网络 VPN
云连接 CC
VPC终端节点 VPCEP
数据库
云数据库 RDS
数据复制服务 DRS
文档数据库服务 DDS
分布式数据库中间件 DDM
云数据库 GaussDB (for openGauss)
云数据库 GaussDB(for MySQL)
云数据库 GaussDB NoSQL
数据管理服务 DAS
数据库和应用迁移 UGO
大数据
MapReduce服务 MRS
数据湖探索 DLI
表格存储服务 CloudTable
可信智能计算服务 TICS
推荐系统 RES
云搜索服务 CSS
数据可视化 DLV
数据湖治理中心 DGC
数据接入服务 DIS
数据仓库服务 GaussDB(DWS)
应用中间件
微服务引擎 CSE
分布式消息服务Kafka版
分布式消息服务RabbitMQ版
API网关 APIG
分布式缓存服务 DCS
分布式消息服务RocketMQ版
企业应用
域名注册服务 Domains
云解析服务 DNS
云速建站 CloudSite
网站备案
华为云WeLink
会议
隐私保护通话 PrivateNumber
语音通话 VoiceCall
消息&短信 MSGSMS
云管理网络
SD-WAN 云服务
边缘数据中心管理 EDCM
云桌面 Workspace
应用与数据集成平台 ROMA Connect
ROMA资产中心 ROMAExchange
API全生命周期管理 ROMA API
安全与合规
安全技术与应用
DDoS防护 ADS
Web应用防火墙 WAF
云防火墙 CFW
应用信任中心 ATC
企业主机安全 HSS
容器安全服务 CGS
云堡垒机 CBH
数据库安全服务 DBSS
数据加密服务 DEW
数据安全中心 DSC
云证书管理服务 CCM
SSL证书管理 SCM
漏洞扫描服务 VSS
态势感知 SA
威胁检测服务 MTD
管理检测与响应 MDR
安全治理云图 Compass
迁移
主机迁移服务 SMS
对象存储迁移服务 OMS
云数据迁移 CDM
专属云
专属计算集群 DCC
解决方案
高性能计算 HPC
SAP
游戏云
混合云灾备
华为工业云平台 IMC
价格
成本优化最佳实践
专属云商业逻辑
用户服务
帐号中心
费用中心
成本中心
资源中心
企业管理
工单管理
客户运营能力
国际站常见问题
支持计划
专业服务
合作伙伴支持计划
更新时间:2021-11-26 GMT+08:00
分享

响应数据结构

表1 v1.ReplicationController响应参数

参数

参数类型

描述

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 v1.ReplicationControllerList响应参数

参数

参数类型

描述

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 replication controllers.

表3 v1.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

-

表4 v1.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

items object

List of pods.

表5 v1.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

-

表6 v1.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

v1.PodTemplate object

List of pod templates.

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

-

表8 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 docker inspect.

表9 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.

表10 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://'.

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

参数

参数类型

描述

waiting

waiting object

-

running

running object

-

terminated

terminated object

-

表12 waiting字段数据结构说明

参数

参数类型

描述

reason

String

(brief) reason the container is not yet running.

message

String

Message regarding why the container is not yet running.

表13 running字段数据结构说明

参数

参数类型

描述

startedAt

String

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

表14 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://'.

表15 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.

表16 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

-

表17 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 than 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

Object

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

Object

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.

表18 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 container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)

template

template object

-

表19 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.

表20 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.

表21 pending字段数据结构说明

参数

参数类型

描述

name

String

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

表22 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".

表23 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).

表24 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.

表25 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.

表26 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. Defaults 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.

表27 template字段数据结构说明

参数

参数类型

描述

metadata

metadata object

-

spec

spec object

-

表28 spec字段数据结构说明

参数

参数类型

描述

volumes

volumes object

List of volumes that can be mounted by containers belonging to the pod.

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.

terminationGracePeriodSeconds

Integer

Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds.

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. For example, in the case of docker, only DockerConfig type secrets are honored.

表29 volumes字段数据结构说明

参数

参数类型

描述

name

String

Volume's name. Must be a DNS_LABEL and unique within the pod.

hostPath

hostPath object

-

emptyDir

emptyDir object

-

gitRepo

gitRepo object

-

secret

secret object

-

nfs

nfs object

-

iscsi

iscsi object

-

glusterfs

glusterfs object

-

persistentVolumeClaim

persistentVolumeClaim object

-

rbd

rbd object

-

cinder

cinder object

-

cephfs

cephfs object

-

flocker

flocker object

-

downwardAPI

downwardAPI object

-

fc

fc object

-

vsphereVolume

vsphereVolume object

-

表30 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

Docker image name.

command

Array of strings

Entrypoint array. Not executed within a shell. The docker 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 docker 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 Docker'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

volumeMounts object

Pod volumes to mount into the container's file system. Cannot be updated.

livenessProbe

livenessProbe object

-

readinessProbe

readinessProbe 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.

表31 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.

表32 imagePullSecrets字段数据结构说明

参数

参数类型

描述

name

String

Name of the referent.

表33 hostPath字段数据结构说明

参数

参数类型

描述

path

String

Path of the directory on the host.

表34 emptyDir字段数据结构说明

参数

参数类型

描述

medium

String

What type of storage medium should back this directory. The default is "" which means to use the node's default medium. Must be an empty string (default) or Memory.

表35 gitRepo字段数据结构说明

参数

类型

描述

repository

String

Repository URL

revision

String

Commit hash for the specified revision.

表36 secret字段数据结构说明

参数

参数类型

描述

secretName

String

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

表37 nfs字段数据结构说明

参数

参数类型

描述

server

String

Server is the hostname or IP address of the NFS server.

path

String

Path that is exported by the NFS server.

readOnly

Boolean

ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false.

表38 iscsi字段数据结构说明

参数

参数类型

描述

targetPortal

String

iSCSI target portal. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).

iqn

String

Target iSCSI Qualified Name.

lun

Integer

iSCSI target lun number.

fsType

String

Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs".

readOnly

Boolean

ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.

表39 glusterfs字段数据结构说明

参数

参数类型

描述

endpoints

String

EndpointsName is the endpoint name that details Glusterfs topology.

path

String

Path is the Glusterfs volume path.

readOnly

Boolean

ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false.

表40 persistentVolumeClaim字段数据结构说明

参数

参数类型

描述

claimName

String

ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume.

readOnly

Boolean

Will force the ReadOnly setting in VolumeMounts. Default false.

表41 rbd字段数据结构说明

参数

参数类型

描述

monitors

Array of strings

A collection of Ceph monitors.

image

String

The rados image name.

fsType

String

Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs".

pool

String

The rados pool name. Default is rbd.

user

String

The rados user name. Default is admin.

keyring

String

Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring.

secretRef

imagePullSecrets object

-

readOnly

Boolean

ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.

表42 cinder字段数据结构说明

参数

参数类型

描述

volumeID

Array of strings

volume id used to identify the volume in cinder

fsType

String

Required: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Only ext3 and ext4 are allowed.

readOnly

Boolean

Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.

表43 cephfs字段数据结构说明

参数

参数类型

描述

monitors

Array of strings

Required: Monitors is a collection of Ceph monitors

user

String

Optional: User is the rados user name, default is admin

secretFile

String

SecretFile is the path to key ring for User, default is /etc/ceph/user.

secretRef

imagePullSecrets object

-

readOnly

Boolean

Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.

表44 flocker字段数据结构说明

参数

参数类型

描述

datasetName

String

Required: the volume name. This is going to be store on metadata -> name on the payload for Flocker.

表45 downwardAPI字段数据结构说明

参数

参数类型

描述

items

items object

Items is a list of downward API volume file.

表46 fc字段数据结构说明

参数

参数类型

描述

targetWWNs

Array of strings

Required: FC target world wide names (WWNs)

lun

Integer

Required: FC target lun number

fsType

String

Required: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs"

readOnly

Boolean

Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.

表47 vsphereVolume字段数据结构说明

参数

参数类型

描述

volumePath

String

Path that identifies vSphere volume vmdk.

fsType

String

Filesystem type to mount.

Must be a filesystem type supported by the host operating system.Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.

表48 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 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 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.

表49 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

-

表50 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.

表51 volumeMounts字段数据结构说明

参数

参数类型

描述

name

String

This must match the Name of a Volume.

readOnly

Boolean

Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.

mountPath

String

Path within the container at which the volume should be mounted.

subPath

String

Path within the volume from which the container's volume should be mounted.

Defaults to "" (volume's root).

表52 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.

表53 lifecycle字段数据结构说明

参数

参数类型

描述

postStart

postStart/preStop object

-

preStop

postStart/preStop object

-

表54 securityContext字段数据结构说明

参数

类型

描述

capabilities

capabilities object

-

privileged

Boolean

Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults 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.

表55 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.

表56 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

-

表57 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.

表58 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 exec'd, 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.

表59 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.

表60 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.

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

参数

参数类型

描述

exec

exec object

-

httpGet

httpGet object

-

tcpSocket

tcpSocket object

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

表62 capabilities字段数据结构说明

参数

参数类型

描述

add

Table68 Data structure of the add field

Added capabilities

drop

表65

Removed capabilities

表63 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.

表64 resourceFieldRef 字段数据结构说明

参数

类型

描述

containerName

String

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

resource

String

Required: resource to select.

divisor

String

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

表65 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.

表66 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.

表67 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.

分享:

    相关文档

    相关产品

关闭导读