Namespace
apiVersion: v1
import "k8s.io/api/core/v1"
Namespace
Namespace 为 Names 提供了一个范围。使用多个命名空间是可选的。
apiVersion: v1
kind: Namespace
metadata (ObjectMeta)
标准对象的元数据。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
spec (NamespaceSpec)
Spec 定义了 Namespace 的行为。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
status (NamespaceStatus)
Status 描述了 Namespace 的当前状态。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
NamespaceSpec
NamespaceSpec 描述了 Namespace 的属性。
finalizers ([]string)
原子性:在合并期间将被替换
Finalizers 是一个不透明的值列表,必须为空才能将对象永久地从存储中删除。更多信息: https://kubernetes.ac.cn/docs/tasks/administer-cluster/namespaces/
NamespaceStatus
NamespaceStatus 包含有关 Namespace 当前状态的信息。
conditions ([]NamespaceCondition)
补丁策略:按键
type
合并映射:合并时将保留键类型上的唯一值
表示 Namespace 当前状态的最新可用观察。
NamespaceCondition 包含有关命名空间状态的详细信息。
conditions.status (string),必需
条件的 status,可以是 True、False、Unknown 之一。
conditions.type (string),必需
命名空间控制器条件的类型。
conditions.lastTransitionTime (Time)
条件上次从一种状态转换到另一种状态的时间。
Time 是 time.Time 的一个包装器,支持正确地编组到 YAML 和 JSON。提供了 time 包提供的许多工厂方法的包装器。
conditions.message (string)
人类可读的消息,指示上次转换的详细信息。
conditions.reason (string)
条件上次转换的唯一、单字、驼峰式原因。
phase (string)
Phase 是命名空间的当前生命周期阶段。更多信息: https://kubernetes.ac.cn/docs/tasks/administer-cluster/namespaces/
NamespaceList
NamespaceList 是一个命名空间列表。
apiVersion: v1
kind: NamespaceList
metadata (ListMeta)
标准列表元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
items ([]Namespace), required
Items 是列表中的 Namespace 对象列表。更多信息: https://kubernetes.ac.cn/docs/concepts/overview/working-with-objects/namespaces/
操作
get
读取指定的 Namespace
HTTP 请求
GET /api/v1/namespaces/{name}
参数
name (在路径中): string,必填
Namespace 的名称
pretty (在查询中): string
响应
200 (Namespace): OK
401: 未授权
get
读取指定的 Namespace 的状态
HTTP 请求
GET /api/v1/namespaces/{name}/status
参数
name (在路径中): string,必填
Namespace 的名称
pretty (在查询中): string
响应
200 (Namespace): OK
401: 未授权
list
列出或监视 Namespace 类型的对象
HTTP 请求
GET /api/v1/namespaces
参数
allowWatchBookmarks (在查询中): boolean
continue (在查询中): string
fieldSelector (在查询中): string
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
watch (在查询中): boolean
响应
200 (NamespaceList): OK
401: 未授权
create
创建一个 Namespace
HTTP 请求
POST /api/v1/namespaces
参数
body: Namespace, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (Namespace): OK
201 (Namespace): Created
202 (Namespace): Accepted
401: 未授权
update
替换指定的 Namespace
HTTP 请求
PUT /api/v1/namespaces/{name}
参数
name (在路径中): string,必填
Namespace 的名称
body: Namespace, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (Namespace): OK
201 (Namespace): Created
401: 未授权
update
替换指定的 Namespace 的 finalize
HTTP 请求
PUT /api/v1/namespaces/{name}/finalize
参数
name (在路径中): string,必填
Namespace 的名称
body: Namespace, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (Namespace): OK
201 (Namespace): Created
401: 未授权
update
替换指定的 Namespace 的状态
HTTP 请求
PUT /api/v1/namespaces/{name}/status
参数
name (在路径中): string,必填
Namespace 的名称
body: Namespace, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (Namespace): OK
201 (Namespace): Created
401: 未授权
patch
部分更新指定的 Namespace
HTTP 请求
PATCH /api/v1/namespaces/{name}
参数
name (在路径中): string,必填
Namespace 的名称
body: Patch,必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (在查询中): boolean
pretty (在查询中): string
响应
200 (Namespace): OK
201 (Namespace): Created
401: 未授权
patch
部分更新指定的 Namespace 的状态
HTTP 请求
PATCH /api/v1/namespaces/{name}/status
参数
name (在路径中): string,必填
Namespace 的名称
body: Patch,必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (在查询中): boolean
pretty (在查询中): string
响应
200 (Namespace): OK
201 (Namespace): Created
401: 未授权
delete
删除一个 Namespace
HTTP 请求
DELETE /api/v1/namespaces/{name}
参数
name (在路径中): string,必填
Namespace 的名称
body: DeleteOptions
dryRun (在查询中): string
gracePeriodSeconds (在查询中): integer
ignoreStoreReadErrorWithClusterBreakingPotential (在查询中): boolean
pretty (在查询中): string
propagationPolicy (在查询中): string
响应
200 (Status): OK
202 (Status): 已接受
401: 未授权
本页面是自动生成的。
如果你打算报告此页面存在的问题,请在问题描述中提及此页面是自动生成的。修复可能需要在 Kubernetes 项目的其他地方进行。