diff --git a/content/zh-cn/docs/reference/kubernetes-api/cluster-resources/service-cidr-v1beta1.md b/content/zh-cn/docs/reference/kubernetes-api/cluster-resources/service-cidr-v1beta1.md new file mode 100644 index 0000000000..3bc4dc7f93 --- /dev/null +++ b/content/zh-cn/docs/reference/kubernetes-api/cluster-resources/service-cidr-v1beta1.md @@ -0,0 +1,982 @@ +--- +api_metadata: + apiVersion: "networking.k8s.io/v1beta1" + import: "k8s.io/api/networking/v1beta1" + kind: "ServiceCIDR" +content_type: "api_reference" +description: "ServiceCIDR 使用 CIDR 格式定义 IP 地址的范围" +title: "ServiceCIDR v1beta1" +weight: 10 +--- + + +`apiVersion: networking.k8s.io/v1beta1` + +`import "k8s.io/api/networking/v1beta1"` + +## ServiceCIDR {#ServiceCIDR} + + +ServiceCIDR 使用 CIDR 格式定义 IP 地址的范围(例如 192.168.0.0/24 或 2001:db2::/64)。 +此范围用于向 Service 对象分配 ClusterIP。 + +
+ +- **apiVersion**: networking.k8s.io/v1beta1 + +- **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} + + +ServiceCIDRSpec 定义用户想要为 Service 分配 ClusterIP 所用的 CIDR。 + +
+ + +- **cidrs** ([]string) + + **原子:将在合并期间被替换** + + cidrs 以 CIDR 表示法定义 IP 块(例如 "192.168.0.0/24" 或 "2001:db8::/64"), + 从此 IP 块中为服务分配集群 IP。允许最多两个 CIDR,每个 IP 簇一个 CIDR。此字段是不可变更的。 + +## ServiceCIDRStatus {#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} + + +ServiceCIDRList 包含 ServiceCIDR 对象的列表。 + +
+ +- **apiVersion**: networking.k8s.io/v1beta1 + +- **kind**: ServiceCIDRList + + +- **metadata** (}}">ListMeta) + + 标准的对象元数据。更多信息: + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + +- **items** ([]}}">ServiceCIDR),必需 + + items 是 ServiceCIDR 的列表。 + + +## 操作 {#Operations} + +
+ +### `get` 读取指定的 ServiceCIDR + +#### HTTP + +GET /apis/networking.k8s.io/v1beta1/servicecidrs/{name} + + +#### 参数 + +- **name** (**路径参数**): string,必需 + + ServiceCIDR 的名称。 + +- **pretty** (**查询参数**): string + + }}">pretty + + +#### 响应 + +200 (}}">ServiceCIDR): OK + +401: Unauthorized + + +### `get` 读取指定的 ServiceCIDR 的状态 + +#### HTTP 请求 + +GET /apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status + + +#### 参数 + +- **name** (**路径参数**): string,必需 + + ServiceCIDR 的名称。 + +- **pretty** (**查询参数**): string + + }}">pretty + + +#### 响应 + +200 (}}">ServiceCIDR): OK + +401: Unauthorized + + +### `list` 列举或监视 ServiceCIDR 类别的对象 + +#### HTTP 请求 + +GET /apis/networking.k8s.io/v1beta1/servicecidrs + + +#### 参数 + +- **allowWatchBookmarks** (**查询参数**): boolean + + }}">allowWatchBookmarks + +- **continue** (**查询参数**): string + + }}">continue + +- **fieldSelector** (**查询参数**): string + + }}">fieldSelector + +- **labelSelector** (**查询参数**): string + + }}">labelSelector + +- **limit** (**查询参数**): integer + + }}">limit + +- **pretty** (**查询参数**): string + + }}">pretty + +- **resourceVersion** (**查询参数**): string + + }}">resourceVersion + +- **resourceVersionMatch** (**查询参数**): string + + }}">resourceVersionMatch + +- **sendInitialEvents** (**查询参数**): boolean + + }}">sendInitialEvents + +- **timeoutSeconds** (**查询参数**): integer + + }}">timeoutSeconds + +- **watch** (**查询参数**): boolean + + }}">watch + + +#### 响应 + +200 (}}">ServiceCIDRList): OK + +401: Unauthorized + + +### `create` 创建 ServiceCIDR + +#### HTTP 请求 + +POST /apis/networking.k8s.io/v1beta1/servicecidrs + + +#### 参数 + +- **body**: }}">ServiceCIDR,必需 + +- **dryRun** (**查询参数**): string + + }}">dryRun + +- **fieldManager** (**查询参数**): string + + }}">fieldManager + +- **fieldValidation** (**查询参数**): string + + }}">fieldValidation + +- **pretty** (**查询参数**): string + + }}">pretty + + +#### 响应 + +200 (}}">ServiceCIDR): OK + +201 (}}">ServiceCIDR): Created + +202 (}}">ServiceCIDR): Accepted + +401: Unauthorized + + +### `update` 替换指定的 ServiceCIDR + +#### HTTP 请求 + +PUT /apis/networking.k8s.io/v1beta1/servicecidrs/{name} + + +#### 参数 + +- **name** (**路径参数**): string,必需 + + ServiceCIDR 的名称。 + +- **body**: }}">ServiceCIDR,必需 + +- **dryRun** (**查询参数**): string + + }}">dryRun + +- **fieldManager** (**查询参数**): string + + }}">fieldManager + +- **fieldValidation** (**查询参数**): string + + }}">fieldValidation + +- **pretty** (**查询参数**): string + + }}">pretty + + +#### 响应 + +200 (}}">ServiceCIDR): OK + +201 (}}">ServiceCIDR): Created + +401: Unauthorized + + +### `update` 替换指定的 ServiceCIDR 的状态 + +#### HTTP 请求 + +PUT /apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status + + +#### 参数 + +- **name** (**路径参数**): string,必需 + + ServiceCIDR 的名称。 + +- **body**: }}">ServiceCIDR,必需 + +- **dryRun** (**查询参数**): string + + }}">dryRun + +- **fieldManager** (**查询参数**): string + + }}">fieldManager + +- **fieldValidation** (**查询参数**): string + + }}">fieldValidation + +- **pretty** (**查询参数**): string + + }}">pretty + + +#### 响应 + +200 (}}">ServiceCIDR): OK + +201 (}}">ServiceCIDR): Created + +401: Unauthorized + + +### `patch` 部分更新指定的 ServiceCIDR + +#### HTTP 请求 + +PATCH /apis/networking.k8s.io/v1beta1/servicecidrs/{name} + + +#### 参数 + +- **name** (**路径参数**): string,必需 + + ServiceCIDR 的名称。 + +- **body**: }}">Patch,必需 + +- **dryRun** (**查询参数**): string + + }}">dryRun + +- **fieldManager** (**查询参数**): string + + }}">fieldManager + +- **fieldValidation** (**查询参数**): string + + }}">fieldValidation + +- **force** (**查询参数**): boolean + + }}">force + +- **pretty** (**查询参数**): string + + }}">pretty + + +#### 响应 + +200 (}}">ServiceCIDR): OK + +201 (}}">ServiceCIDR): Created + +401: Unauthorized + + +### `patch` 部分更新指定的 ServiceCIDR 的状态 + +#### HTTP 请求 + +PATCH /apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status + + +#### 参数 + +- **name** (**路径参数**): string,必需 + + ServiceCIDR 的名称。 + +- **body**: }}">Patch,必需 + +- **dryRun** (**查询参数**): string + + }}">dryRun + +- **fieldManager** (**查询参数**): string + + }}">fieldManager + +- **fieldValidation** (**查询参数**): string + + }}">fieldValidation + +- **force** (**查询参数**): boolean + + }}">force + +- **pretty** (**查询参数**): string + + }}">pretty + + +#### 响应 + +200 (}}">ServiceCIDR): OK + +201 (}}">ServiceCIDR): Created + +401: Unauthorized + + +### `delete` 删除 ServiceCIDR + +#### HTTP 请求 + +DELETE /apis/networking.k8s.io/v1beta1/servicecidrs/{name} + + +#### 参数 + +- **name** (**路径参数**): string,必需 + + ServiceCIDR 的名称。 + +- **body**: }}">DeleteOptions + +- **dryRun** (**查询参数**): string + + }}">dryRun + +- **gracePeriodSeconds** (**查询参数**): integer + + }}">gracePeriodSeconds + +- **pretty** (**查询参数**): string + + }}">pretty + +- **propagationPolicy** (**查询参数**): string + + }}">propagationPolicy + + +#### 响应 + +200 (}}">Status): OK + +202 (}}">Status): Accepted + +401: Unauthorized + + +### `deletecollection` 删除 ServiceCIDR 的集合 + +#### HTTP 请求 + +DELETE /apis/networking.k8s.io/v1beta1/servicecidrs + + +#### 参数 + +- **body**: }}">DeleteOptions + +- **continue** (**查询参数**): string + + }}">continue + +- **dryRun** (**查询参数**): string + + }}">dryRun + +- **fieldSelector** (**查询参数**): string + + }}">fieldSelector + +- **gracePeriodSeconds** (**查询参数**): integer + + }}">gracePeriodSeconds + +- **labelSelector** (**查询参数**): string + + }}">labelSelector + +- **limit** (**查询参数**): integer + + }}">limit + +- **pretty** (**查询参数**): string + + }}">pretty + +- **propagationPolicy** (**查询参数**): string + + }}">propagationPolicy + +- **resourceVersion** (**查询参数**): string + + }}">resourceVersion + +- **resourceVersionMatch** (**查询参数**): string + + }}">resourceVersionMatch + +- **sendInitialEvents** (**查询参数**): boolean + + }}">sendInitialEvents + +- **timeoutSeconds** (**查询参数**): integer + + }}">timeoutSeconds + + +#### 响应 + +200 (}}">Status): OK + +401: Unauthorized