• 沒有找到結果。

v1beta1.Net workStatus

5 Kubernetes API

5.1.4 删除 ConfigMap

功能介绍

删除ConfigMap。

调试

您可以在API Explorer中调试该接口。

URI

DELETE /api/v1/namespaces/{namespace}/configmaps/{name}

5-60 路径参数

参数 是否必选 参数类型 描述

name 是 String name of the ConfigMap

namespace 是 String object name and auth scope,

such as for teams and projects

5-61 Query 参数

参数 是否必选 参数类型 描述

gracePeriodSe

conds 否 Integer The duration in seconds before

the object should be deleted.

Value must be non-negative integer. The value zero indicates delete immediately.

If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.

orphanDepen

dents 否 Boolean Deprecated: please use the

PropagationPolicy, this field will be deprecated in 1.7.

Should the dependent objects be orphaned. If true/false, the

"orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.

propagationP

olicy 否 String Whether and how garbage

collection will be performed.

Either this field or

OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are:

'Orphan' - orphan the dependents; 'Background' -allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the

foreground.

pretty 否 String If 'true', then the output is

pretty printed.

5-62 请求 Header 参数

参数 是否必选 参数类型 描述

X-Auth-Token 是 String 用户Token。

通过调用IAM服务获取用户 Token接口获取(响应消息头中 X-Subject-Token的值)。

Content-Type 是 String 消息体的类型(格式),默认取

值为“application/json”

缺省值:application/json

5-63 请求 Body 参数

参数 是否必选 参数类型 描述

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.

More info: https://git.k8s.io/

community/contributors/

devel/api-conventions.md#resources gracePeriodSe

conds 否 Long The duration in seconds before

the object should be deleted.

Value must be non-negative integer. The value zero indicates delete immediately.

If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.

参数 是否必选 参数类型 描述

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. More info: https://git.k8s.io/

community/contributors/

devel/api-conventions.md#types-kinds orphanDepen

dents 否 Boolean Deprecated: please use the

PropagationPolicy, this field will be deprecated in 1.7.

Should the dependent objects be orphaned. If true/false, the

"orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.

preconditions 否

io.k8s.apimac hinery.pkg.ap is.meta.v1.Pr econditions

object

Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.

propagationP

olicy 否 String Whether and how garbage

collection will be performed.

Either this field or

OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are:

'Orphan' - orphan the dependents; 'Background' -allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the

foreground.

参数 是否必选 参数类型 描述

uid 否 String Specifies the target UID.

响应参数

状态码: 200

5-65 响应 Body 参数

参数 参数类型 描述

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. More info: https://git.k8s.io/community/

contributors/devel/api-conventions.md#resources

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

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.

More info: https://git.k8s.io/community/

contributors/devel/api-conventions.md#types-kinds

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

Standard list metadata. More info: https://

git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds

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". More info: https://git.k8s.io/

community/contributors/devel/api-conventions.md#spec-and-status

5-66 io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails_v3

参数 参数类型 描述

causes Array of

io.k8s.apimac hinery.pkg.ap is.meta.v1.St atusCause_v2

objects

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. More info: https://git.k8s.io/

community/contributors/devel/api-conventions.md#types-kinds

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

retryAfterSeco

nds 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). More info:

http://kubernetes.io/docs/user-guide/

identifiers#uids

参数 参数类型 描述

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.

5-68 io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta_v2

参数 参数类型 描述

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.

resourceVersi

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

More info: https://git.k8s.io/community/

contributors/devel/api- conventions.md#concurrency-control-and-consistency

selfLink String selfLink is a URL representing this object.

Populated by the system. Read-only.

请求示例

{ "apiVersion" : "v1", "gracePeriodSeconds" : 0, "kind" : "DeleteOptions"

}

响应示例

状态码: 200 OK

{ "apiVersion" : "v1", "code" : 200, "details" : {

"kind" : "configmaps", "name" : "configmap-test",

"uid" : "379519a3-aff0-11e8-8f17-c81fbe371a17"

}, "kind" : "Status", "metadata" : { }, "status" : "Success"

}

状态码

状态码 描述

200 OK

400 BadRequest

401 Unauthorized

403 Forbidden

404 NotFound

405 MethodNotAllowed 406 NotAcceptable 409 Conflict

415 UnsupportedMediaType

422 Invalid

429 TooManyRequests 500 InternalError 503 ServiceUnavailable 504 ServerTimeout

功能介绍

查询ConfigMap详细信息。

调试

您可以在API Explorer中调试该接口。

URI

GET /api/v1/namespaces/{namespace}/configmaps/{name}

5-69 路径参数

参数 是否必选 参数类型 描述

name 是 String name of the ConfigMap

namespace 是 String object name and auth scope,

such as for teams and projects

5-70 Query 参数

参数 是否必选 参数类型 描述

exact 否 Boolean Should the export be exact.

Exact export maintains cluster-specific fields like 'Namespace'.

export 否 Boolean Should this value be exported.

Export strips fields that a user can not specify.

pretty 否 String If 'true', then the output is

pretty printed.

请求参数

5-71 请求 Header 参数

参数 是否必选 参数类型 描述

X-Auth-Token 是 String 用户Token。

通过调用IAM服务获取用户 Token接口获取(响应消息头中 X-Subject-Token的值)。

响应参数

状态码: 200

5-72 响应 Body 参数

参数 参数类型 描述

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. More info: https://git.k8s.io/community/

contributors/devel/api-conventions.md#resources binaryData Map<String,St

ring> BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet.

data Map<String,St

ring> Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process.

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.

More info: https://git.k8s.io/community/

contributors/devel/api-conventions.md#types-kinds

metadata

io.k8s.apimac hinery.pkg.ap is.meta.v1.Ob jectMeta_v3

object

Standard object's metadata. More info: https://

git.k8s.io/community/contributors/devel/api-conventions.md#metadata

参数 参数类型 描述 annotations Map<String,St

ring> 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. More info: http://kubernetes.io/docs/user-guide/

annotations

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.

creationTimes

tamp 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. More info: https://git.k8s.io/community/

contributors/devel/api-conventions.md#metadata deletionGrace

PeriodSecond s

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

相關文件