ClusterCIDR v1alpha1
apiVersion: networking.k8s.io/v1alpha1
import "k8s.io/api/networking/v1alpha1"
ClusterCIDR
ClusterCIDR 代表启用 MultiCIDRRangeAllocator 时每个节点 Pod CIDR 分配的单个配置(请参阅 kube-controller-manager 的配置)。一个集群可以拥有任意数量的 ClusterCIDR 资源,所有这些资源都将在为节点分配 CIDR 时被考虑。当节点选择器匹配目标节点且有可分配的空闲 CIDR 时,ClusterCIDR 才有资格用于给定节点。如果多个匹配的 ClusterCIDR 资源,分配器将尝试使用内部启发式方法来打破平局,但任何节点选择器与节点匹配的 ClusterCIDR 都可以使用。
apiVersion: networking.k8s.io/v1alpha1
kind: ClusterCIDR
metadata (ObjectMeta)
标准对象的元数据。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
spec (ClusterCIDRSpec)
spec 是 ClusterCIDR 的期望状态。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
ClusterCIDRSpec
ClusterCIDRSpec 定义了 ClusterCIDR 的期望状态。
perNodeHostBits (int32), 必需
perNodeHostBits 定义了为每个节点配置的主机位数量。子网掩码决定了地址中多少位用于网络位和主机位。例如,一个 IPv4 地址 192.168.0.0/24 将地址分成 24 位用于网络部分和 8 位用于主机部分。要分配 256 个 IP,将此字段设置为 8(IPv4 的 /24 掩码或 IPv6 的 /120)。最小值为 4(16 个 IP)。此字段不可变。
ipv4 (string)
ipv4 以 CIDR 表示法定义一个 IPv4 IP 块(例如“10.0.0.0/8”)。必须指定 ipv4 和 ipv6 中的至少一个。此字段不可变。
ipv6 (string)
ipv6 以 CIDR 表示法定义一个 IPv6 IP 块(例如“2001:db8::/64”)。必须指定 ipv4 和 ipv6 中的至少一个。此字段不可变。
nodeSelector (NodeSelector)
nodeSelector 定义了配置适用于哪些节点。空或 nil nodeSelector 选择所有节点。此字段不可变。
节点选择器表示对一组节点执行的一个或多个标签查询结果的并集;也就是说,它表示节点选择器项表示的选择器的 OR。
nodeSelector.nodeSelectorTerms ([]NodeSelectorTerm), 必需
必需。节点选择器项列表。这些项通过 OR 连接。
空或空的节点选择器项不匹配任何对象。它们的 requirement 通过 AND 连接。TopologySelectorTerm 类型实现了 NodeSelectorTerm 的一个子集。
nodeSelector.nodeSelectorTerms.matchExpressions ([]NodeSelectorRequirement)
节点标签的节点选择器要求列表。
nodeSelector.nodeSelectorTerms.matchFields ([]NodeSelectorRequirement)
节点字段的节点选择器要求列表。
ClusterCIDRList
ClusterCIDRList 包含一个 ClusterCIDR 列表。
apiVersion: networking.k8s.io/v1alpha1
kind: ClusterCIDRList
metadata (ListMeta)
标准对象的元数据。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
items ([]ClusterCIDR), 必需
items 是 ClusterCIDR 的列表。
操作
get
读取指定的 ClusterCIDR
HTTP 请求
GET /apis/networking.k8s.io/v1alpha1/clustercidrs/{name}
参数
name (在路径中): string, 必需
ClusterCIDR 的名称
pretty (在查询中): string
响应
200 (ClusterCIDR): 正常
401: 未经授权
list
列出或监视 ClusterCIDR 类型的对象
HTTP 请求
GET /apis/networking.k8s.io/v1alpha1/clustercidrs
参数
allowWatchBookmarks (在查询中): boolean
continue (在查询中): string
fieldSelector (在查询中): string
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
watch (在查询中): boolean
响应
200 (ClusterCIDRList): 正常
401: 未经授权
create
创建一个 ClusterCIDR
HTTP 请求
POST /apis/networking.k8s.io/v1alpha1/clustercidrs
参数
body: ClusterCIDR, 必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (ClusterCIDR): 正常
201 (ClusterCIDR): 已创建
202 (ClusterCIDR): 已接受
401: 未经授权
update
替换指定的 ClusterCIDR
HTTP 请求
PUT /apis/networking.k8s.io/v1alpha1/clustercidrs/{name}
参数
name (在路径中): string, 必需
ClusterCIDR 的名称
body: ClusterCIDR, 必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (ClusterCIDR): 正常
201 (ClusterCIDR): 已创建
401: 未经授权
patch
部分更新指定的 ClusterCIDR
HTTP 请求
PATCH /apis/networking.k8s.io/v1alpha1/clustercidrs/{name}
参数
name (在路径中): string, 必需
ClusterCIDR 的名称
body: Patch, 必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (在查询中): boolean
pretty (在查询中): string
响应
200 (ClusterCIDR): 正常
201 (ClusterCIDR): 已创建
401: 未经授权
delete
删除一个 ClusterCIDR
HTTP 请求
DELETE /apis/networking.k8s.io/v1alpha1/clustercidrs/{name}
参数
name (在路径中): string, 必需
ClusterCIDR 的名称
body: DeleteOptions
dryRun (在查询中): string
gracePeriodSeconds (在查询中): integer
pretty (在查询中): string
propagationPolicy (在查询中): string
响应
200 (Status): 正常
202 (Status): 已接受
401: 未经授权
deletecollection
删除 ClusterCIDR 的集合
HTTP 请求
DELETE /apis/networking.k8s.io/v1alpha1/clustercidrs
参数
body: DeleteOptions
continue (在查询中): string
dryRun (在查询中): string
fieldSelector (在查询中): string
gracePeriodSeconds (在查询中): integer
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
propagationPolicy (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
响应
200 (Status): 正常
401: 未经授权
此页面是自动生成的。
如果您打算报告此页面的问题,请在问题描述中提及该页面是自动生成的。修复可能需要在 Kubernetes 项目中的其他地方进行。