ServiceCIDR
apiVersion: networking.k8s.io/v1
import "k8s.io/api/networking/v1"
ServiceCIDR
ServiceCIDR 使用 CIDR 格式定义 IP 地址的范围(例如 192.168.0.0/24 或 2001:db2::/64)。 此范围用于向 Service 对象分配 ClusterIP。
- 
apiVersion: networking.k8s.io/v1 
- 
kind: ServiceCIDR 
- 
metadata (ObjectMeta) 标准的对象元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 
- 
spec (ServiceCIDRSpec) spec 是 ServiceCIDR 的期望状态。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 
- 
status (ServiceCIDRStatus) status 表示 ServiceCIDR 的当前状态。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 
ServiceCIDRSpec
ServiceCIDRSpec 定义用户想要为 Service 分配 ClusterIP 所用的 CIDR。
- 
cidrs ([]string) 原子:将在合并期间被替换 cidrs 以 CIDR 表示法定义 IP 块(例如 "192.168.0.0/24" 或 "2001:db8::/64"), 从此 IP 块中为 Service 分配集群 IP。允许最多两个 CIDR,每个 IP 簇一个 CIDR。此字段是不可变更的。 
ServiceCIDRStatus
ServiceCIDRStatus 描述 ServiceCIDR 的当前状态。
- 
conditions ([]Condition) 补丁策略:基于键 type合并Map:合并时将保留 type 键的唯一值 conditions 包含一个 metav1.Condition 数组,描述 ServiceCIDR 的状态。 condition 包含此 API 资源某一方面当前状态的详细信息。 - 
conditions.lastTransitionTime (Time),必需 lastTransitionTime 是状况最近一次状态转化的时间。 变化应该发生在下层状况发生变化的时候。如果不知道下层状况发生变化的时间, 那么使用 API 字段更改的时间是可以接受的。 Time 是 time.Time 的包装类,支持正确地序列化为 YAML 和 JSON。 为 time 包提供的许多工厂方法提供了包装类。 
 - 
conditions.message (string),必需 message 是人类可读的消息,有关转换的详细信息,可以是空字符串。 
- 
conditions.reason (string),必需 reason 包含一个程序标识符,指示 condition 最后一次转换的原因。 特定状况类型的生产者可以定义该字段的预期值和含义,以及这些值是否被视为有保证的 API。 此值应该是 CamelCase 字符串且不能为空。 
 - 
conditions.status (string),必需 condition 的状态,可选值为 True、False、Unknown 之一。 
- 
conditions.type (string),必需 CamelCase 或 foo.example.com/CamelCase 中的条件类型。 
- 
conditions.observedGeneration (int64) observedGeneration 表示设置 condition 基于的 .metadata.generation 的过期次数。 例如,如果 .metadata.generation 当前为 12,但 .status.conditions[x].observedGeneration 为 9, 则 condition 相对于实例的当前状态已过期。 
 
- 
ServiceCIDRList
ServiceCIDRList 包含 ServiceCIDR 对象的列表。
- 
apiVersion: networking.k8s.io/v1 
- 
kind: ServiceCIDRList 
- 
metadata (ListMeta) 标准的对象元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 
- 
items ([]ServiceCIDR),必需 items 是 ServiceCIDR 的列表。 
操作
get 读取指定的 ServiceCIDR
HTTP
GET /apis/networking.k8s.io/v1/servicecidrs/{name}
参数
- 
name (路径参数): string,必需 ServiceCIDR 的名称。 
- 
pretty (查询参数): string 
响应
200 (ServiceCIDR): OK
401: Unauthorized
get 读取指定的 ServiceCIDR 的状态
HTTP 请求
GET /apis/networking.k8s.io/v1/servicecidrs/{name}/status
参数
- 
name (路径参数): string,必需 ServiceCIDR 的名称。 
- 
pretty (查询参数): string 
响应
200 (ServiceCIDR): OK
401: Unauthorized
list 列举或监视 ServiceCIDR 类别的对象
HTTP 请求
GET /apis/networking.k8s.io/v1/servicecidrs
参数
- 
allowWatchBookmarks (查询参数): boolean 
- 
continue (查询参数): string 
- 
fieldSelector (查询参数): string 
- 
labelSelector (查询参数): string 
- 
limit (查询参数): integer 
- 
pretty (查询参数): string 
- 
resourceVersion (查询参数): string 
- 
resourceVersionMatch (查询参数): string 
- 
sendInitialEvents (查询参数): boolean 
- 
timeoutSeconds (查询参数): integer 
- 
watch (查询参数): boolean 
响应
200 (ServiceCIDRList): OK
401: Unauthorized
create 创建 ServiceCIDR
HTTP 请求
POST /apis/networking.k8s.io/v1/servicecidrs
参数
- 
body: ServiceCIDR,必需 
- 
dryRun (查询参数): string 
- 
fieldManager (查询参数): string 
- 
fieldValidation (查询参数): string 
- 
pretty (查询参数): string 
响应
200 (ServiceCIDR): OK
201 (ServiceCIDR): Created
202 (ServiceCIDR): Accepted
401: Unauthorized
update 替换指定的 ServiceCIDR
HTTP 请求
PUT /apis/networking.k8s.io/v1/servicecidrs/{name}
参数
- 
name (路径参数): string,必需 ServiceCIDR 的名称。 
- 
body: ServiceCIDR,必需 
- 
dryRun (查询参数): string 
- 
fieldManager (查询参数): string 
- 
fieldValidation (查询参数): string 
- 
pretty (查询参数): string 
响应
200 (ServiceCIDR): OK
201 (ServiceCIDR): Created
401: Unauthorized
update 替换指定的 ServiceCIDR 的状态
HTTP 请求
PUT /apis/networking.k8s.io/v1/servicecidrs/{name}/status
参数
- 
name (路径参数): string,必需 ServiceCIDR 的名称。 
- 
body: ServiceCIDR,必需 
- 
dryRun (查询参数): string 
- 
fieldManager (查询参数): string 
- 
fieldValidation (查询参数): string 
- 
pretty (查询参数): string 
响应
200 (ServiceCIDR): OK
201 (ServiceCIDR): Created
401: Unauthorized
patch 部分更新指定的 ServiceCIDR
HTTP 请求
PATCH /apis/networking.k8s.io/v1/servicecidrs/{name}
参数
- 
name (路径参数): string,必需 ServiceCIDR 的名称。 
- 
body: Patch,必需 
- 
dryRun (查询参数): string 
- 
fieldManager (查询参数): string 
- 
fieldValidation (查询参数): string 
- 
force (查询参数): boolean 
- 
pretty (查询参数): string 
响应
200 (ServiceCIDR): OK
201 (ServiceCIDR): Created
401: Unauthorized
patch 部分更新指定的 ServiceCIDR 的状态
HTTP 请求
PATCH /apis/networking.k8s.io/v1/servicecidrs/{name}/status
参数
- 
name (路径参数): string,必需 ServiceCIDR 的名称。 
- 
body: Patch,必需 
- 
dryRun (查询参数): string 
- 
fieldManager (查询参数): string 
- 
fieldValidation (查询参数): string 
- 
force (查询参数): boolean 
- 
pretty (查询参数): string 
响应
200 (ServiceCIDR): OK
201 (ServiceCIDR): Created
401: Unauthorized
delete 删除 ServiceCIDR
HTTP 请求
DELETE /apis/networking.k8s.io/v1/servicecidrs/{name}
参数
- 
name (路径参数): string,必需 ServiceCIDR 的名称。 
- 
body: DeleteOptions 
- 
dryRun (查询参数): string 
- 
gracePeriodSeconds (查询参数): integer 
- 
ignoreStoreReadErrorWithClusterBreakingPotential (查询参数): boolean 
- 
pretty (查询参数): string 
- 
propagationPolicy (查询参数): string 
响应
200 (Status): OK
202 (Status): Accepted
401: Unauthorized
deletecollection 删除 ServiceCIDR 的集合
HTTP 请求
DELETE /apis/networking.k8s.io/v1/servicecidrs
参数
- 
body: DeleteOptions 
- 
continue (查询参数): string 
- 
dryRun (查询参数): string 
- 
fieldSelector (查询参数): string 
- 
gracePeriodSeconds (查询参数): integer 
- 
ignoreStoreReadErrorWithClusterBreakingPotential (查询参数): boolean 
- 
labelSelector (查询参数): string 
- 
limit (查询参数): integer 
- 
pretty (查询参数): string 
- 
propagationPolicy (查询参数): string 
- 
resourceVersion (查询参数): string 
- 
resourceVersionMatch (查询参数): string 
- 
sendInitialEvents (查询参数): boolean 
- 
timeoutSeconds (查询参数): integer 
响应
200 (Status): OK
401: Unauthorized