uk8s

package
v0.22.97 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2026 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Overview

Package uk8s include resources of ucloud uk8s product

See also

for detail.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddUK8SExistingUHostRequest

type AddUK8SExistingUHostRequest struct {
	request.CommonBase

	// UK8S集群ID。 可从UK8S控制台获取。
	ClusterId *string `required:"true"`

	// 用于标示添加完节点后是否将节点临时禁用. 传入 "true" 表示禁用,传入其它或不传表示不禁用
	DisableSchedule *bool `required:"false"`

	// 镜像 Id,不填时后台程序会自动选用一个可用的镜像 Id,支持用户自定义镜像,自定义镜像必须基于基础镜像制作。
	ImageId *string `required:"false"`

	// 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行,UserData则是云主机初始化时执行。
	InitScript *string `required:"false"`

	// Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game
	Labels *string `required:"false"`

	// 默认110,生产环境建议小于等于110。
	MaxPods *int `required:"false"`

	// Node节点密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64
	Password *string `required:"true"`

	// 该云主机所属子网Id。
	SubnetId *string `required:"false"`

	// 云主机Id,为了保证节点正常运行,该主机配置不得低于2C4G。
	UHostId *string `required:"true"`

	// 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码。
	UserData *string `required:"false"`
}

AddUK8SExistingUHostRequest is request schema for AddUK8SExistingUHost action

type AddUK8SExistingUHostResponse

type AddUK8SExistingUHostResponse struct {
	response.CommonBase

	// 返回错误消息,当 RetCode 非 0 时提供详细的描述信息。
	Message string
}

AddUK8SExistingUHostResponse is response schema for AddUK8SExistingUHost action

type AddUK8SNodeGroupRequest added in v0.21.31

type AddUK8SNodeGroupRequest struct {
	request.CommonBase

	// 系统盘大小,单位GB。默认40。范围:[40, 500]。注意SSD本地盘无法调整。
	BootDiskSize *int `required:"false"`

	// 磁盘类型
	BootDiskType *string `required:"false"`

	// GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关)
	CPU *int `required:"false"`

	// 计费模式
	ChargeType *string `required:"false"`

	// 集群ID
	ClusterId *string `required:"true"`

	// 数据磁盘大小
	DataDiskSize *int `required:"false"`

	// 磁盘类型
	DataDiskType *string `required:"false"`

	// GPU卡核心数
	GPU *int `required:"false"`

	// GPU类型
	GpuType *string `required:"false"`

	// 镜像ID
	ImageId *string `required:"false"`

	// 云主机机型。枚举值["N", "C", "G", "O", "OS"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。
	MachineType *string `required:"false"`

	// 内存大小。单位:MB
	Mem *int `required:"false"`

	// 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto"
	MinimalCpuPlatform *string `required:"false"`

	// 节点池名字
	NodeGroupName *string `required:"true"`

	// 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。
	SubnetId *string `required:"false"`

	// 业务组
	Tag *string `required:"false"`
}

AddUK8SNodeGroupRequest is request schema for AddUK8SNodeGroup action

type AddUK8SNodeGroupResponse added in v0.21.31

type AddUK8SNodeGroupResponse struct {
	response.CommonBase

	// 返回错误消息,当 RetCode 非 0 时提供详细的描述信息。
	Message string

	// 节点池ID
	NodeGroupId string
}

AddUK8SNodeGroupResponse is response schema for AddUK8SNodeGroup action

type AddUK8SPHostNodeRequest

type AddUK8SPHostNodeRequest struct {
	request.CommonBase

	// 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ 默认为月付
	ChargeType *string `required:"true"`

	// UK8S集群ID。 可从UK8S控制台获取。
	ClusterId *string `required:"true"`

	// 最大创建Node节点数量,取值范围是[1,10]。
	Count *int `required:"true"`

	// 用于标示添加完节点后是否将节点临时禁用. 传入 "true" 表示禁用,传入其它或不传表示不禁用
	DisableSchedule *bool `required:"false"`

	// 镜像 Id,不填时后台程序会自动选用一个可用的镜像 Id,支持用户自定义镜像,自定义镜像必须基于基础镜像制作。
	ImageId *string `required:"false"`

	// 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行。
	InitScript *string `required:"false"`

	// Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game
	Labels *string `required:"false"`

	// 默认110,生产环境建议小于等于110。
	MaxPods *int `required:"false"`

	// 网络环境,可选千兆:1G ,万兆:10G, 默认1G。
	NIC *string `required:"false"`

	// Node节点密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64
	Password *string `required:"true"`

	// 购买时长。默认: 1。月付时,此参数传0,代表了购买至月末。
	Quantity *int `required:"false"`

	// Raid配置,默认Raid10 支持:Raid0、Raid1、Raid5、Raid10,NoRaid
	Raid *string `required:"false"`

	// 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。
	SubnetId *string `required:"false"`

	// 物理机类型,默认为:db-2(基础型-SAS-V3)
	Type *string `required:"false"`
}

AddUK8SPHostNodeRequest is request schema for AddUK8SPHostNode action

type AddUK8SPHostNodeResponse

type AddUK8SPHostNodeResponse struct {
	response.CommonBase

	// 返回错误消息,当 RetCode 非 0 时提供详细的描述信息。
	Message string
}

AddUK8SPHostNodeResponse is response schema for AddUK8SPHostNode action

type AddUK8SUHostNodeParamKubeletConfiguration added in v0.22.91

type AddUK8SUHostNodeParamKubeletConfiguration struct {

	// 全量KubeletConfiguration.XXX定义参考AddUK8SNodeGroup接口: https://uxiao.ucloudadmin.com/#/api-manager/api/detail/UK8S/AddUK8SNodeGroup
	ContainerLogMaxFiles *string `required:"false"`
}

AddUK8SUHostNodeParamKubeletConfiguration is request schema for complex param

type AddUK8SUHostNodeParamNetworkInterface added in v0.22.88

type AddUK8SUHostNodeParamNetworkInterface struct {

	//
	EIP *AddUK8SUHostNodeParamNetworkInterfaceEIP `required:"false"`
}

AddUK8SUHostNodeParamNetworkInterface is request schema for complex param

type AddUK8SUHostNodeParamNetworkInterfaceEIP added in v0.22.88

type AddUK8SUHostNodeParamNetworkInterfaceEIP struct {

	// 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式下非必传, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800]
	Bandwidth *int `required:"false"`

	// 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。
	CouponId *string `required:"false"`

	// 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International,BGP: Bgp。各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International
	OperatorName *string `required:"false"`

	// 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. "Free":免费带宽模式,默认为 "Bandwidth"
	PayMode *string `required:"false"`

	// 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效
	ShareBandwidthId *string `required:"false"`
}

AddUK8SUHostNodeParamNetworkInterfaceEIP is request schema for complex param

type AddUK8SUHostNodeParamSecGroupId added in v0.22.88

type AddUK8SUHostNodeParamSecGroupId struct {

	// 安全组 ID。至多可以同时绑定5个安全组。
	Id *string `required:"false"`

	// 安全组名称。
	Name *string `required:"false"`

	// 安全组优先级。取值范围[1, 5]
	Priority *string `required:"false"`
}

AddUK8SUHostNodeParamSecGroupId is request schema for complex param

type AddUK8SUHostNodeParamUserLabels added in v0.22.91

type AddUK8SUHostNodeParamUserLabels struct {

	// UK8S用户资源标签的键值
	Key *string `required:"false"`

	// UK8S用户资源标签的值
	Value *string `required:"false"`
}

AddUK8SUHostNodeParamUserLabels is request schema for complex param

type AddUK8SUHostNodeRequest

type AddUK8SUHostNodeRequest struct {
	request.CommonBase

	// 系统盘大小,单位GB。默认40。范围:[40, 500]。注意SSD本地盘无法调整。
	BootDiskSize *int `required:"false"`

	// 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘
	BootDiskType *string `required:"false"`

	// 虚拟CPU核数。可选参数:2-64(具体机型与CPU的对应关系参照控制台)。默认值: 4。
	CPU *int `required:"true"`

	// 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按小时后付费(支持关机不收费,目前仅部分可用区支持,请联系您的客户经理) \\ 默认为月付
	ChargeType *string `required:"true"`

	// UK8S集群ID。 可从UK8S控制台获取。
	ClusterId *string `required:"true"`

	// 创建Node节点数量,取值范围是[1,50]。
	Count *int `required:"true"`

	// 数据磁盘大小,单位GB。默认0。范围 :[20, 1000]
	DataDiskSize *int `required:"false"`

	// 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘
	DataDiskType *string `required:"false"`

	// 用于标示添加完节点后是否将节点临时禁用. 传入 "true" 表示禁用,传入其它或不传表示不禁用
	DisableSchedule *bool `required:"false"`

	// GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关)
	GPU *int `required:"false"`

	// GPU类型,枚举值["K80", "P40", "V100",],MachineType为G时必填
	GpuType *string `required:"false"`

	// 镜像 Id,不填时后台程序会自动选用一个可用的镜像 Id,支持用户自定义镜像,自定义镜像必须基于基础镜像制作。
	ImageId *string `required:"false"`

	// 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行,UserData则是云主机初始化时执行。
	InitScript *string `required:"false"`

	// 硬件隔离组id。可通过DescribeIsolationGroup获取。
	IsolationGroup *string `required:"false"`

	//
	KubeletConfiguration *AddUK8SUHostNodeParamKubeletConfiguration `required:"false"`

	// Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game
	Labels *string `required:"false"`

	// 云主机机型。枚举值["N", "C", "G", "O", "OS"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。
	MachineType *string `required:"false"`

	// 默认110,生产环境建议小于等于110。
	MaxPods *int `required:"false"`

	// 内存大小。单位:MB。范围 :[4096, 262144],取值为1024的倍数(可选范围参考控制台)。默认值:8192
	Mem *int `required:"true"`

	// 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto"
	MinimalCpuPlatform *string `required:"false"`

	// 【该字段已废弃,请谨慎使用】
	MinmalCpuPlatform *string `required:"false" deprecated:"true"`

	// 自定义主机名前缀。完整的自定义主机名为{NamePrefix}-{NodeIP}。
	NamePrefix *string `required:"false"`

	// 网络增强特性。枚举值:Normal,不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0;Extreme,开启网络增强3.0; Infiniband, 开启网络增强4.0(详情参考主机官网文档)
	NetCapability *string `required:"false"`

	//
	NetworkInterface []AddUK8SUHostNodeParamNetworkInterface `required:"false"`

	// 节点池id
	NodeGroupId *string `required:"false"`

	// Node节点密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64
	Password *string `required:"false"`

	// 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。
	Quantity *int `required:"false"`

	//
	SecGroupId []AddUK8SUHostNodeParamSecGroupId `required:"false"`

	// 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。
	SecurityGroupId *string `required:"false"`

	// 主机安全模式。Firewall:防火墙;SecGroup:安全组;默认值:Firewall。
	SecurityMode *string `required:"false"`

	// 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。
	SubnetId *string `required:"false"`

	// 业务组
	Tag *string `required:"false"`

	// Node节点污点,形式为key=value:effect,多组taints用”,“隔开,最多支持五组。
	Taints *string `required:"false"`

	// 主机规格族
	UHostFamily *string `required:"false"`

	// 弹性网卡特性。开启了弹性网卡权限位,此特性才生效,默认 false 未开启,true 开启。
	UNIFeature *bool `required:"false"`

	// 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码。
	UserData *string `required:"false"`

	//
	UserLabels []AddUK8SUHostNodeParamUserLabels `required:"false"`
}

AddUK8SUHostNodeRequest is request schema for AddUK8SUHostNode action

type AddUK8SUHostNodeResponse

type AddUK8SUHostNodeResponse struct {
	response.CommonBase

	// 返回错误消息,当 RetCode 非 0 时提供详细的描述信息。
	Message string

	// Node实例Id集合
	NodeIds []string
}

AddUK8SUHostNodeResponse is response schema for AddUK8SUHostNode action

type Autoscaler added in v0.22.91

type Autoscaler struct {

	// 打开/关闭
	Enabled int

	// 静默时间
	ScaleDownDelayAfterAdd string

	// GPU缩容阈值
	ScaleDownGpuUtilizationThreshold string

	// 缩容触发延时
	ScaleDownUnneededTime string

	// CPU缩容阈值
	ScaleDownUtilizationThreshold string

	//
	UpdateTime int

	// 伸缩器版本
	Version string
}

Autoscaler -

type ClusterSet

type ClusterSet struct {

	// 集群apiserver地址
	ApiServer string

	// CNI网络模式
	CNIMode string

	// 集群ID
	ClusterId string

	// 创建集群时判断如果为NORESOURCE则为没资源,否则为空
	ClusterLogInfo string

	// 资源名字
	ClusterName string

	// 计费/管理形态,区分"专有版"和"托管版"两种售卖形态
	ClusterType string

	// 创建时间
	CreateTime int

	// 删除保护开关。0表示不开启,1表示开启。默认不开启
	DeleteProtection int

	// 集群外部apiserver地址
	ExternalApiServer string

	// 集群版本
	K8sVersion string

	// API Server 内部回环客户端证书
	LoopbackClientCert LoopbackClientCert

	// Master 节点数量
	MasterCount int

	// Node节点数量
	NodeCount int

	// Pod网段
	PodCIDR string

	// 容器运行时名称
	RuntimeName string

	// 容器运行时版本号,docker 或 containerd 版本
	RuntimeVersion string

	// 服务网段
	ServiceCIDR string

	// 集群状态,枚举值:初始化:"INITIALIZING";启动中:"STARTING";创建失败:"CREATEFAILED";正常运行:"RUNNING";添加节点:"ADDNODE";删除节点:"DELNODE";删除中:"DELETING";删除失败:"DELETEFAILED";错误:"ERROR";升级插件:"UPDATE_PLUGIN";更新插件信息:"UPDATE_PLUGIN_INFO";异常:"ABNORMAL";升级集群中:"UPGRADING";容器运行时切换:"CONVERTING"
	Status string

	// 所属子网
	SubnetId string

	// 所属VPC
	VPCId string
}

ClusterSet - 集群信息

type CreateUK8SClusterV2ParamKubeProxy

type CreateUK8SClusterV2ParamKubeProxy struct {

	// 集群kube-proxy模式。支持iptables和ipvs,默认为iptables。
	Mode *string `required:"false"`
}

CreateUK8SClusterV2ParamKubeProxy is request schema for complex param

type CreateUK8SClusterV2ParamMaster

type CreateUK8SClusterV2ParamMaster struct {

	//
	SecGroupId []CreateUK8SClusterV2ParamMasterSecGroupId `required:"false"`

	// Master节点所属可用区,需要设置 Master.0.Zone、 Master.1.Zone、Master.2.Zone 三个 Master 节点的可用区。 三个节点可部署在不同可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
	Zone *string `required:"true"`
}

CreateUK8SClusterV2ParamMaster is request schema for complex param

type CreateUK8SClusterV2ParamMasterSecGroupId added in v0.22.88

type CreateUK8SClusterV2ParamMasterSecGroupId struct {

	// 安全组 ID。至多可以同时绑定5个安全组。
	Id *string `required:"false"`

	// 安全组名称。
	Name *string `required:"false"`

	// 安全组优先级。取值范围[1, 5]
	Priority *string `required:"false"`
}

CreateUK8SClusterV2ParamMasterSecGroupId is request schema for complex param

type CreateUK8SClusterV2ParamNodes

type CreateUK8SClusterV2ParamNodes struct {

	// Node节点的系统盘大小,单位GB,默认为40。范围:[40, 500]。注意SSD本地盘无法调整。
	BootDiskSIze *int `required:"false"`

	// 一组Node节点的系统盘类型,请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘
	BootDiskType *string `required:"false"`

	// 一组Node节点的虚拟CPU核数。单位:核,范围:[2, 64],可选范围参考控制台。
	CPU *int `required:"true"`

	// 一组Node节点的数量,范围:[1,10]。
	Count *int `required:"true"`

	// 数据磁盘大小,单位GB。默认0。范围 :[20, 1000]
	DataDiskSize *int `required:"false"`

	// 一组Node节点的数据盘类型,请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘
	DataDiskType *string `required:"false"`

	// 一组Node节点的GPU卡核心数,仅GPU机型支持此字段。
	GPU *int `required:"false"`

	// 一组Node节点的GPU类型,枚举值["K80", "P40", "V100"],最新值参考Console。
	GpuType *string `required:"false"`

	// Node节点的镜像 ID,不填则使用ImageId参数。支持用户自定义镜像。
	ImageId *string `required:"false"`

	// 一组Node节点的隔离组Id,归属于同一隔离组的虚拟机节点将落在不同的物理机上,单个隔离组最多只能容纳8个节点。参见DescribeIsolationGroup。
	IsolationGroup *string `required:"false"`

	// Node节点标签,形式为key=value,多组Labels用”,“隔开,最多支持五组。
	Labels *string `required:"false"`

	// 一组Nodes节点云主机机型,如["N", "C", "O", "OS"],具体请参照云主机机型。
	MachineType *string `required:"true"`

	// Node节点上可运行最大节点数,默认为110。
	MaxPods *int `required:"false"`

	// 一组Node节点的内存大小。单位:MB,范围 :[4096, 262144],取值为1024的倍数,可选范围参考控制台。
	Mem *int `required:"true"`

	// Node节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。
	MinimalCpuPlatform *string `required:"false"`

	// 【该字段已废弃,请谨慎使用】
	MinmalCpuPlatform *string `required:"false" deprecated:"true"`

	// 一组Node的自定义主机名前缀。 完整的自定义主机名为{NamePrefix}-{NodeIP}。
	NamePrefix *string `required:"false"`

	//
	NetworkInterface []CreateUK8SClusterV2ParamNodesNetworkInterface `required:"false"`

	//
	SecGroupId []CreateUK8SClusterV2ParamNodesSecGroupId `required:"false"`

	// 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。
	SecurityGroupId *string `required:"false"`

	// 主机安全模式。Firewall:防火墙;SecGroup:安全组;默认值:Firewall。
	SecurityMode *string `required:"false"`

	// Node节点污点,形式为key=value:effect,多组taints用”,“隔开,最多支持五组。
	Taints *string `required:"false"`

	// 弹性网卡特性。开启了弹性网卡权限位,此特性才生效,默认 false 未开启,true 开启。
	UNIFeature *string `required:"false"`

	// 一组Nodes节点所属可用区,可创建多组Nodes节点,如一组是CPU Nodes节点,另一组是GPU Nodes节点。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
	Zone *string `required:"true"`
}

CreateUK8SClusterV2ParamNodes is request schema for complex param

type CreateUK8SClusterV2ParamNodesNetworkInterface added in v0.22.88

type CreateUK8SClusterV2ParamNodesNetworkInterface struct {

	//
	EIP *CreateUK8SClusterV2ParamNodesNetworkInterfaceEIP `required:"false"`
}

CreateUK8SClusterV2ParamNodesNetworkInterface is request schema for complex param

type CreateUK8SClusterV2ParamNodesNetworkInterfaceEIP added in v0.22.88

type CreateUK8SClusterV2ParamNodesNetworkInterfaceEIP struct {

	// 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式下非必传, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800]
	Bandwidth *int `required:"false"`

	// 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。
	CouponId *string `required:"false"`

	// 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International BGP: Bgp 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International
	OperatorName *string `required:"false"`

	// 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. "Free":免费带宽模式,默认为 "Bandwidth"
	PayMode *string `required:"false"`

	// 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效
	ShareBandwidthId *string `required:"false"`
}

CreateUK8SClusterV2ParamNodesNetworkInterfaceEIP is request schema for complex param

type CreateUK8SClusterV2ParamNodesSecGroupId added in v0.22.88

type CreateUK8SClusterV2ParamNodesSecGroupId struct {

	// 安全组 ID。至多可以同时绑定5个安全组。
	Id *string `required:"false"`

	// 安全组名称。
	Name *string `required:"false"`

	// 安全组优先级。取值范围[1, 5]
	Priority *string `required:"false"`
}

CreateUK8SClusterV2ParamNodesSecGroupId is request schema for complex param

type CreateUK8SClusterV2Request

type CreateUK8SClusterV2Request struct {
	request.CommonBase

	// 集群所有节点的付费模式。枚举值为: Year,按年付费; Month,按月付费; Dynamic,按小时付费(需开启权限),默认按月。
	ChargeType *string `required:"false"`

	// 创建集群的时候定义clusterdomain
	ClusterDomain *string `required:"false"`

	// 集群名称
	ClusterName *string `required:"true"`

	// 是否允许外网访问apiserver,开启:Yes 不开启:No。默认为No。
	ExternalApiServer *string `required:"false"`

	// LbClass为nlb的时候支持的源ip转发模式,目前只支持Toa,为空则不开源ip功能 枚举:"",Toa
	ForwardSrcIPMethod *string `required:"false"`

	// Master节点和Node节点的镜像 ID,不填则随机选择可用的基础镜像。支持用户自定义镜像。
	ImageId *string `required:"false"`

	// 用户自定义脚本,与UserData不同,自定义脚本将在集群安装完毕后执行。注意:1、总数据量大小不超多16K;2、使用base64编码。
	InitScript *string `required:"false"`

	// k8s集群的版本,版本信息请参考UK8S集群创建页,不指定的话默认为当前支持的最高版本。
	K8sVersion *string `required:"false"`

	//
	KubeProxy *CreateUK8SClusterV2ParamKubeProxy `required:"false"`

	// master lb 类型默认ulb,可选ulb nlb
	LbClass *string `required:"false"`

	//
	Master []CreateUK8SClusterV2ParamMaster `required:"false"`

	// Master节点系统盘大小,单位GB,默认为40。范围:[40, 500]。注意SSD本地盘无法调整。
	MasterBootDiskSize *int `required:"false"`

	// Master节点系统盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘
	MasterBootDiskType *string `required:"false"`

	// Master节点的虚拟CPU核数。可选参数:2-64(具体机型与CPU的对应关系参照控制台)。
	MasterCPU *int `required:"true"`

	// Master节点的数据盘大小,单位GB,默认为0。范围 :[20, 1000]
	MasterDataDiskSize *int `required:"false"`

	// Master节点数据盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘
	MasterDataDiskType *string `required:"false"`

	// Master节点的镜像 ID,不填则使用ImageId参数。支持用户自定义镜像。
	MasterImageId *string `required:"false"`

	// 【无效,已删除】当前将自动为Master节点创建隔离组,确保Master节点归属于不同物理机。
	MasterIsolationGroup *string `required:"false"`

	// Master节点的云主机机型(V2.0),如["N", "C", "O", "OS"],具体请参照云主机机型。
	MasterMachineType *string `required:"true"`

	// Master节点的内存大小。单位:MB。范围 :[4096, 262144],取值为1024的倍数(可选范围参考控制台)。
	MasterMem *int `required:"true"`

	// Master节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。
	MasterMinimalCpuPlatform *string `required:"false"`

	// 【该字段已废弃,请谨慎使用】
	MasterMinmalCpuPlatform *string `required:"false" deprecated:"true"`

	//
	Nodes []CreateUK8SClusterV2ParamNodes `required:"false"`

	// 集群节点密码,包括Master和Node。密码需包含最少一个大写字母,请使用base64进行编码,举例如下:# echo -n Password1 | base64
	Password *string `required:"true"`

	// 购买时长。默认为1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。
	Quantity *int `required:"false"`

	// Service 网段,用于分配ClusterIP,如172.17.0.0/16。该网段不能与集群所属VPC网段重叠。
	ServiceCIDR *string `required:"true"`

	// 集群Node及Pod所属子网
	SubnetId *string `required:"true"`

	// 业务组
	Tag *string `required:"false"`

	// 用户自定义数据。注意:1、总数据量大小不超多16K;2、使用base64编码。
	UserData *string `required:"false"`

	// UK8S用户标签,key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game
	UserLabels *string `required:"false"`

	// 集群Node及Pod所属VPC
	VPCId *string `required:"true"`
}

CreateUK8SClusterV2Request is request schema for CreateUK8SClusterV2 action

type CreateUK8SClusterV2Response

type CreateUK8SClusterV2Response struct {
	response.CommonBase

	// 集群ID
	ClusterId string
}

CreateUK8SClusterV2Response is response schema for CreateUK8SClusterV2 action

type DelUK8SClusterNodeV2Request

type DelUK8SClusterNodeV2Request struct {
	request.CommonBase

	// UK8S集群ID。 可从UK8S控制台获取。
	ClusterId *string `required:"true"`

	// Node在UK8S处的唯一标示,如uk8s-reewqe5-sdasadsda。**非云主机或物理云主机资源Id**
	NodeId *string `required:"true"`

	// 删除节点时是否释放数据盘。 枚举值[true:释放,false: 不释放],默认为true。
	ReleaseDataUDisk *bool `required:"false"`
}

DelUK8SClusterNodeV2Request is request schema for DelUK8SClusterNodeV2 action

type DelUK8SClusterNodeV2Response

type DelUK8SClusterNodeV2Response struct {
	response.CommonBase

	// 返回错误消息,当 RetCode 非 0 时提供详细的描述信息。
	Message string
}

DelUK8SClusterNodeV2Response is response schema for DelUK8SClusterNodeV2 action

type DelUK8SClusterRequest

type DelUK8SClusterRequest struct {
	request.CommonBase

	// 集群id
	ClusterId *string `required:"true"`

	// 是否删除节点挂载的数据盘。枚举值[true:删除,false: 不删除],默认不删除
	ReleaseUDisk *bool `required:"false"`
}

DelUK8SClusterRequest is request schema for DelUK8SCluster action

type DelUK8SClusterResponse

type DelUK8SClusterResponse struct {
	response.CommonBase
}

DelUK8SClusterResponse is response schema for DelUK8SCluster action

type DescribeUK8SClusterRequest added in v0.21.27

type DescribeUK8SClusterRequest struct {
	request.CommonBase

	// k8s集群ID
	ClusterId *string `required:"true"`
}

DescribeUK8SClusterRequest is request schema for DescribeUK8SCluster action

type DescribeUK8SClusterResponse added in v0.21.27

type DescribeUK8SClusterResponse struct {
	response.CommonBase

	// 集群apiserver地址
	ApiServer string

	// 集群的节点伸缩(CA)配置
	Autoscaler Autoscaler

	// 集群CA根证书
	CACert string

	// CNI模式,可选值VPC/Calico
	CNIMode string

	// 自定义或者默认的clusterdomain
	ClusterDomain string

	// 集群ID
	ClusterId string

	// 资源名字
	ClusterName string

	// 集群版本
	ClusterType string

	// 创建时间
	CreateTime int

	// Pod是否使用独立子网
	DedicatedPodSubnet bool

	// 删除保护开关。0表示不开启,1表示开启。默认不开启
	DeleteProtection int

	// 是否开启了授权管理功能
	EnableUserAuth bool

	// 集群etcd服务证书
	EtcdCert string

	// 集群etcd服务密钥
	EtcdKey string

	// 集群外部apiserver地址
	ExternalApiServer string

	// 外部 API Server 负载均衡实例 ID
	ExternalUlb string

	// 内部 API Server 负载均衡实例 ID
	InternalUlb string

	// kube-proxy配置
	KubeProxy KubeProxy

	// 负载均衡类型
	LbClass string

	// API Server 回环客户端证书
	LoopbackClientCert LoopbackClientCert

	// Master 节点数量
	MasterCount int

	// Master节点配置信息,具体参考UhostInfo。托管版不返回该信息
	MasterList []UhostInfo

	// Master配置预警:Normal正常;Warning 需要升级;Error    需要紧急升级;
	MasterResourceStatus string

	// 集群的监控类型:no无监控;cloudwatch统一监控平台;prometheus内置监控
	MonitorType string

	// 节点网段
	NodeCIDR string

	// Node节点数量
	NodeCount int

	// Node节点配置信息,具体参考UhostInfo
	NodeList []UhostInfo

	// Pod网段
	PodCIDR string

	// Pod使用的独立子网列表
	PodSubnetIds []string

	// Pod独立子网内的ip使用的安全组
	PodSubnetSecGroups []string

	// 容器运行时名称
	RuntimeName string

	// 容器运行时版本
	RuntimeVersion string

	// 服务网段
	ServiceCIDR string

	// 状态
	Status string

	// 所属子网
	SubnetId string

	// 更新时间
	UpdateTime int

	// 所属VPC
	VPCId string

	// K8S版本
	Version string
}

DescribeUK8SClusterResponse is response schema for DescribeUK8SCluster action

type DescribeUK8SImageRequest

type DescribeUK8SImageRequest struct {
	request.CommonBase

	// 适用GPU类型,如1080Ti、4090、V100、A800等,MachineType为G时必须提供
	GPUType *string `required:"false"`

	// k8s集群版本,如1.28.15
	K8sVersion *string `required:"false"`

	// 适用机型,如O、G、OPRO等,默认为O
	MachineType *string `required:"false"`

	// 产品类型,可选值uhost、uphost,不填则返回所有
	ProductType *string `required:"false"`
}

DescribeUK8SImageRequest is request schema for DescribeUK8SImage action

type DescribeUK8SImageResponse

type DescribeUK8SImageResponse struct {
	response.CommonBase

	// 虚拟机自制可用镜像集合, 详见ImageInfo 数组
	CustomImageSet []ImageInfo

	// 裸金属自制可用镜像集合, 详见ImageInfo 数组
	CustomPHostImageSet []ImageInfo

	// 虚拟机可用镜像集合, 详见ImageInfo 数组
	ImageSet []ImageInfo

	// 返回错误消息,当 RetCode 非 0 时提供详细的描述信息。
	Message string

	// 裸金属可用镜像集合, 详见ImageInfo 数组
	PHostImageSet []ImageInfo
}

DescribeUK8SImageResponse is response schema for DescribeUK8SImage action

type DescribeUK8SNodeRequest added in v0.21.9

type DescribeUK8SNodeRequest struct {
	request.CommonBase

	// UK8S 集群 Id
	ClusterId *string `required:"true"`

	// K8S 节点IP或者节点ID
	Name *string `required:"true"`
}

DescribeUK8SNodeRequest is request schema for DescribeUK8SNode action

type DescribeUK8SNodeResponse added in v0.21.9

type DescribeUK8SNodeResponse struct {
	response.CommonBase

	// 操作名称
	Action string

	// 已分配到当前节点的 Pod 数量
	AllocatedPodCount int

	// 字符串数组,每一项是类似 "node.alpha.kubernetes.io/ttl=0" 的注解
	Annotations []string

	// 节点 CPU 总量
	CPUCapacity string

	// 节点上已分配 Pod 的 CPU 限制值
	CPULimits string

	// 节点上已分配 Pod 的 CPU 限制值占 CPU 总量的比例
	CPULimitsFraction string

	// 节点上已分配 Pod 的 CPU 请求量
	CPURequests string

	// 节点上已分配 Pod 的 CPU 请求量占 CPU 总量的比例
	CPURequestsFraction string

	// 节点状态数组
	Conditions []K8SNodeCondition

	// 节点上镜像名称数组
	ContainerImages []string

	// 容器运行时版本,如:"docker://18.9.9"
	ContainerRuntimeVersion string

	// 时间戳,单位是 秒
	CreationTimestamp int

	// 主机名
	Hostname string

	// 内部 IP 地址
	InternalIP string

	// 内核版本,如:"4.19.0-6.el7.ucloud.x86_64"
	KernelVersion string

	// kubeproxy 版本
	KubeProxyVersion string

	// kubelet 版本
	KubeletVersion string

	// 字符串数组,每一项是类似 "kubernetes.io/arch=amd64" 的标签
	Labels []string

	// 节点内存总量
	MemoryCapacity string

	// 节点上已分配 Pod 的内存限制量
	MemoryLimits string

	// 节点上已分配 Pod 的内存限制量占内存总量的比例,如返回值为 "18",则意味着限制量占总量的 18%
	MemoryLimitsFraction string

	// 节点上已分配 Pod 的内存请求量
	MemoryRequests string

	// 节点上已分配 Pod 的内存请求量占内存总量的比例,如返回值为 "4.5",则意味着请求量占总量的 4.5%
	MemoryRequestsFraction string

	// 操作出错时的提示信息
	Message string

	// 节点名称
	Name string

	// 操作系统类型,如:"CentOS Linux 7 (Core)"
	OSImage string

	// 节点允许的可分配 Pod 最大数量
	PodCapacity int

	// 字符串,如:"UCloud://cn-sh2-02//uk8s-vsc0vgob-n-mpzxc"
	ProviderID string

	// 返回码
	RetCode int

	// 字符串数组,每一项是类似 "node-role.kubernetes.io/master:NoSchedule" 的污点
	Taints []string

	// 是否禁止调度
	Unschedulable bool
}

DescribeUK8SNodeResponse is response schema for DescribeUK8SNode action

type DiskSet added in v0.21.27

type DiskSet struct {

	// 备份方案,枚举类型:BASIC_SNAPSHOT,普通快照;DATAARK,方舟。无快照则不返回该字段。
	BackupType string

	// 磁盘长ID
	DiskId string

	// LOCAL_NOMAL| CLOUD_NORMAL| LOCAL_SSD| CLOUD_SSD|EXCLUSIVE_LOCAL_DISK
	DiskType string

	// 磁盘盘符
	Drive string

	// Yes: 加密 No: 非加密
	Encrypted string

	// 当前主机的IOPS值
	IOPS int

	// True| False
	IsBoot string

	// UDisk名字(仅当磁盘是UDisk时返回)
	Name string

	// 磁盘大小,单位: GB
	Size int

	// 磁盘类型。系统盘: Boot,数据盘: Data,网络盘:Udisk
	Type string
}

DiskSet - 节点磁盘信息

type EIP added in v0.22.91

type EIP struct {

	// 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式下非必传, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800]
	Bandwidth int

	// 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。
	CouponId string

	// 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International,BGP: Bgp。 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International
	OperatorName string

	// 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. "Free":免费带宽模式,默认为 "Bandwidth"
	PayMode string

	// 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效
	ShareBandwidthId string
}

EIP - 节点EIP

type EvictionCondition added in v0.22.91

type EvictionCondition struct {

	// 镜像文件系统存储相关驱逐条件或宽限时间。
	ImagefsAvailable string

	// 内存相关驱逐条件或宽限时间。
	MemoryAvailable string

	// 节点存储余量相关驱逐条件或宽限时间。
	NodefsAvailable string

	// 节点剩余inodes驱逐条件或宽限时间。
	NodefsInodesFree string
}

EvictionCondition - 驱逐条件或宽限时间

type GetClusterConfigRequest added in v0.22.34

type GetClusterConfigRequest struct {
	request.CommonBase

	// 集群ID
	ClusterId *string `required:"true"`
}

GetClusterConfigRequest is request schema for GetClusterConfig action

type GetClusterConfigResponse added in v0.22.34

type GetClusterConfigResponse struct {
	response.CommonBase

	// 开启公网apiserver的情况下,有数据返回。
	ExternalKubeConfig string

	// 配置信息
	KubeConfig string

	// 用于标示 kubeconfig 是否可以进行替换更新
	Updatable bool
}

GetClusterConfigResponse is response schema for GetClusterConfig action

type GetUK8SVersionsRequest added in v0.22.88

type GetUK8SVersionsRequest struct {
	request.CommonBase

	// 集群类型,可选值为[Dedicated]
	Kind *string `required:"true"`
}

GetUK8SVersionsRequest is request schema for GetUK8SVersions action

type GetUK8SVersionsResponse added in v0.22.88

type GetUK8SVersionsResponse struct {
	response.CommonBase

	// UK8S 版本信息列表。
	Data []UK8SVersionData
}

GetUK8SVersionsResponse is response schema for GetUK8SVersions action

type IPSet added in v0.21.27

type IPSet struct {

	// IP对应的带宽, 单位: Mb (内网IP不显示带宽信息)
	Bandwidth int

	// 是否默认的弹性网卡的信息。true: 是默认弹性网卡;其他值:不是。
	Default string

	// IP地址
	IP string

	// IP资源ID (内网IP无对应的资源ID)
	IPId string

	// IP 地址分配模式
	IPMode string

	// 网卡的 MAC 地址
	Mac string

	// 虚拟网卡 Id
	NetworkInterfaceId string

	// IP 所在的 子网 Id
	SubnetId string

	// 国际: Internation,BGP: Bgp,内网: Private
	Type string

	// IP 所属的 VPC Id
	VPCId string
}

IPSet - 节点的IP信息

type ImageInfo

type ImageInfo struct {

	// 镜像支持的特性
	Features []string

	// 镜像 Id
	ImageId string

	// 镜像名称
	ImageName string

	// 镜像大小
	ImageSize int

	// 集成软件名称, 如NV驱动版本、cuda版本
	IntegratedSoftware string

	// 该镜像是否支持GPU机型,枚举值[true:不支持,false:支持]。
	NotSupportGPU bool

	// OS 名称
	OsName string

	// OS 类型
	OsType string

	// 支持的GPU机型
	SupportedGPUTypes []string

	// 可用区 Id
	ZoneId int
}

ImageInfo - UK8S 可用镜像信息

type K8SNodeCondition added in v0.21.9

type K8SNodeCondition struct {

	// 最后一次上报状态的时间
	LastProbeTime string

	// 最后一次状态转变时间
	LastTransitionTime string

	// 状态变化的描述信息
	Message string

	// 状态变化的原因
	Reason string

	// 状态,False、True
	Status string

	// Condition 类型,如 MemoryPressure、DiskPressure、PIDPressure、Ready
	Type string
}

K8SNodeCondition - Kubernetes Node Condition

type KubeProxy

type KubeProxy struct {

	// KubeProxy模式,枚举值为[ipvs,iptables]
	Mode string
}

KubeProxy - KubeProxy信息

type KubeletConfiguration added in v0.22.91

type KubeletConfiguration struct {

	// 最大日志文件数量
	ContainerLogMaxFiles int

	// 最大日志文件大小
	ContainerLogMaxSize string

	// 硬性驱逐条件,EvictionCondition类型
	EvictionHard EvictionCondition

	// 软性驱逐条件,EvictionCondition类型
	EvictionSoft EvictionCondition

	// 软性驱逐宽限时间,EvictionCondition类型
	EvictionSoftGracePeriod EvictionCondition

	// 镜像垃圾收集阈值
	ImageGCHighThresholdPercent int

	// 停止镜像垃圾收集阈值
	ImageGCLowThresholdPercent int

	// kubelet预留资源,ReservedResource类型
	KubeReserved ReservedResource

	// 最大Pod数量
	MaxPods int

	// 系统预留资源,ReservedResource类型
	SystemReserved ReservedResource
}

KubeletConfiguration - kubelet自定义配置

type ListUK8SClusterNodeV2Request

type ListUK8SClusterNodeV2Request struct {
	request.CommonBase

	// UK8S集群ID
	ClusterId *string `required:"true"`

	// 可传一个或多个节点id  不传或为空则返回所有节点
	NodeIds *string `required:"false"`
}

ListUK8SClusterNodeV2Request is request schema for ListUK8SClusterNodeV2 action

type ListUK8SClusterNodeV2Response

type ListUK8SClusterNodeV2Response struct {
	response.CommonBase

	// 节点详细信息,见NodeInfoV2。
	NodeSet []NodeInfoV2

	// 满足条件的节点数量,包括Master。
	TotalCount int
}

ListUK8SClusterNodeV2Response is response schema for ListUK8SClusterNodeV2 action

type ListUK8SClusterV2Request

type ListUK8SClusterV2Request struct {
	request.CommonBase

	// UK8S集群ID
	ClusterId *string `required:"false"`

	// 返回数据长度,默认为20。
	Limit *int `required:"false"`

	// 列表起始位置偏移量,默认为0。
	Offset *int `required:"false"`
}

ListUK8SClusterV2Request is request schema for ListUK8SClusterV2 action

type ListUK8SClusterV2Response

type ListUK8SClusterV2Response struct {
	response.CommonBase

	// 满足条件的集群数量
	ClusterCount int

	// 集群信息,具体参考ClusterSet
	ClusterSet []ClusterSet

	// 总数
	TotalCount int
}

ListUK8SClusterV2Response is response schema for ListUK8SClusterV2 action

type ListUK8SNodeGroupRequest added in v0.21.31

type ListUK8SNodeGroupRequest struct {
	request.CommonBase

	// 集群ID
	ClusterId *string `required:"true"`
}

ListUK8SNodeGroupRequest is request schema for ListUK8SNodeGroup action

type ListUK8SNodeGroupResponse added in v0.21.31

type ListUK8SNodeGroupResponse struct {
	response.CommonBase

	// 节点池列表
	NodeGroupList []NodeGroupSet
}

ListUK8SNodeGroupResponse is response schema for ListUK8SNodeGroup action

type LoopbackClientCert added in v0.22.91

type LoopbackClientCert struct {

	// 证书到期时间
	ExpireTime int

	// 证书是否进入过期告警状态
	Warn bool
}

LoopbackClientCert - API Server 回环客户端证书

type NetworkInterface added in v0.22.91

type NetworkInterface struct {

	// EIP
	EIP EIP
}

NetworkInterface - 网络接口

type NodeGroupSet added in v0.21.31

type NodeGroupSet struct {

	// 系统盘大小
	BootDiskSize int

	// 系统盘类型
	BootDiskType string

	// 虚拟CPU核数
	CPU int

	// 付费方式
	ChargeType string

	// 节点池创建时间
	CreateTime int

	// 数据盘大小
	DataDiskSize int

	// 数据盘类型
	DataDiskType string

	// 磁盘列表
	Disks []DiskSet

	// GPU卡核心数
	GPU int

	// GPU类型
	GpuType string

	// 镜像ID
	ImageId string

	// 镜像名称
	ImageName string

	// 镜像类型
	ImageType string

	// 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行,UserData则是云主机初始化时执行。
	InitScript string

	// 硬件隔离组id。可通过DescribeIsolationGroup获取。
	IsolationGroupId string

	// KubeletConfiguration
	KubeletConfiguration KubeletConfiguration

	// Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game
	Labels string

	// 机型
	MachineType string

	// int默认110,生产环境建议小于等于110。
	MaxPods int

	// 内存大小
	Mem int

	// cpu平台
	MinimalCpuPlatform string

	// 网络配置
	NetCapability string

	// Node节点网卡配置
	NetworkInterface []NetworkInterface

	// 节点池ID
	NodeGroupId string

	// 节点池名字
	NodeGroupName string

	// 节点id列表
	NodeList []string

	// 自定义Uhost主机名前缀。完整的自定义Uhost主机名为{NodeNamePrefix}-{NodeIP}。
	NodeNamePrefix string

	// 操作系统名称
	OsName string

	// 操作系统类型
	OsType string

	// 节点池关联的弹性伸缩组ID
	RelatedAsg []string

	// Node所属的安全组id(最多5个)
	SecGroupId []SecGroupId

	// 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。
	SecurityGroupId string

	// 主机安全模式。Firewall:防火墙;SecGroup:安全组;默认值:Firewall。
	SecurityMode string

	// 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。
	SubnetId string

	// 业务组
	Tag string

	// Node节点污点,形式为key=value:effect,多组taints用”,“隔开,最多支持五组。
	Taints string

	// 主机规格族
	UHostFamily string

	// 是否启用 UNI 网络特性
	UNIFeature bool

	// 节点池更新时间
	UpdateTime int

	// 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码。
	UserData string

	// 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
	Zone string
}

NodeGroupSet - 节点池配置

type NodeInfoV2

type NodeInfoV2 struct {

	// 节点所属伸缩组ID,非伸缩组创建出来的节点,伸缩组ID为Default。
	AsgId string

	// 系统盘大小
	BootDiskSize int

	// Node节点CPU核数,单位: 核。
	CPU int

	// CPU平台
	CPUPlatform string

	// 节点创建时间
	CreateTime int

	// 数据盘大小,如果有多块数据盘会汇总展示,不包括PVC
	DataDiskSize int

	// 节点计费到期时间
	ExpireTime int

	// 节点的GPU颗数。
	GPU int

	// 节点GPU型号(如果为GPU机型)
	GPUType string

	// 边缘机房id
	IDCId string

	// 边缘机房
	IDCName string

	// 节点IP信息,详细信息见 UHostIPSet。
	IPSet []UHostIPSet

	// 是否启用了容器镜像加速
	ImageAccelable bool

	// 资源ID,如uhost-xxxx,或uphost-xxxxx。
	InstanceId string

	// 资源名称,初始值等于NodeId,用户可在UHost或UPHost处修改。
	InstanceName string

	// Node节点的资源类型,枚举值为UHost或UPHost。
	InstanceType string

	// kubeproxy信息,详细信息见KubeProxy。
	KubeProxy KubeProxy

	// Kubelet版本
	KubeletVersion string

	// 节点标签
	Labels []string

	// 机型类别,分别对应Uhost的MachineType或PHost的PHostType。
	MachineType string

	// CPU最大可用
	MaxCPU int

	// 内存最大可用
	MaxMemory int

	// pod最大可用
	MaxPod int

	// 内存大小,单位: MB。
	Memory int

	// 节点池id
	NodeGroupId string

	// 节点所属节点池名称
	NodeGroupName string

	// NodeId,Node在UK8S处的唯一标示,如uk8s-reewqe5-sdasadsda
	NodeId string

	// 加节点时判断是否没有资源,如果返回NORESOURCE则代表没有资源了
	NodeLogInfo string

	// node角色,枚举值为master、node
	NodeRole string

	// Node的状态:枚举值:初始化:"Initializing";启动中:"Starting";运行:"Running";停止中:"Stopping";停止:"Stopped";待删除:"ToBeDeleted";删除中:"Deleting";异常:"Error";安装失败:"Install Fail";
	NodeStatus string

	// Node节点的镜像名称。
	OsName string

	// Node节点的操作系统类别,如Linux或Windows。
	OsType string

	// Pod CIDR
	PodCIDR string

	// 节点主机备注信息
	Remark string

	// 已申请的CPU
	RequestCPU int

	// 已申请的Memory
	RequestMemory int

	// 已申请的pod
	RequestPod int

	// Runtime 名字
	RuntimeName string

	// Runtime 版本
	RuntimeVersion string

	// 节点所属业务组
	Tag string

	// 主机规格族
	UHostFamily string

	// 是否允许Pod调度到该节点,枚举值为true或false。
	Unschedulable bool

	// 已使用的CPU
	UsedCPU int

	// 已使用的Memory
	UsedMemory int

	// Node所在可用区
	Zone string
}

NodeInfoV2 - UK8S 节点信息

type RemoveUK8SNodeGroupRequest added in v0.21.31

type RemoveUK8SNodeGroupRequest struct {
	request.CommonBase

	// 集群id
	ClusterId *string `required:"true"`

	// 节点池Id
	NodeGroupId *string `required:"true"`
}

RemoveUK8SNodeGroupRequest is request schema for RemoveUK8SNodeGroup action

type RemoveUK8SNodeGroupResponse added in v0.21.31

type RemoveUK8SNodeGroupResponse struct {
	response.CommonBase
}

RemoveUK8SNodeGroupResponse is response schema for RemoveUK8SNodeGroup action

type ReservedResource added in v0.22.91

type ReservedResource struct {

	// CPU
	CPU string

	// 存储
	EphemeralStorage string

	// 内存
	Memory string

	// Pid
	Pid string
}

ReservedResource - 预留资源

type SecGroupId added in v0.22.91

type SecGroupId struct {

	// 安全组名称
	Id string

	// 安全组id
	Name string

	// 安全组优先级
	Priority string
}

SecGroupId - 安全组

type UHostIPSet

type UHostIPSet struct {

	// IP对应的带宽, 单位: Mb (内网IP不显示带宽信息)
	Bandwidth int

	//
	Default string `deprecated:"true"`

	// IP地址
	IP string

	// IP资源ID (内网IP无对应的资源ID)
	IPId string

	// IP 协议类型
	IPMode string

	// Mac地址
	Mac string

	// 网络接口资源 ID
	NetworkInterfaceId string

	// IP地址对应的子网 ID
	SubnetId string

	// 国际: Internation,BGP: Bgp,内网: Private
	Type string

	// IP地址对应的VPC ID
	VPCId string
}

UHostIPSet - 云主机IP信息

type UK8SClient

type UK8SClient struct {
	*ucloud.Client
}

UK8SClient is the client of UK8S

func NewClient

func NewClient(config *ucloud.Config, credential *auth.Credential) *UK8SClient

NewClient will return a instance of UK8SClient

func (*UK8SClient) AddUK8SExistingUHost

API: AddUK8SExistingUHost

将预先创建好的云主机加入到UK8S集群,需要注意的是,该云主机依然会执行重装系统的操作。

func (*UK8SClient) AddUK8SNodeGroup added in v0.21.31

func (c *UK8SClient) AddUK8SNodeGroup(req *AddUK8SNodeGroupRequest) (*AddUK8SNodeGroupResponse, error)

API: AddUK8SNodeGroup

添加UK8S节点池

func (*UK8SClient) AddUK8SPHostNode

func (c *UK8SClient) AddUK8SPHostNode(req *AddUK8SPHostNodeRequest) (*AddUK8SPHostNodeResponse, error)

API: AddUK8SPHostNode

为UK8S集群添加一台或多台物理云主机类型的节点。

func (*UK8SClient) AddUK8SUHostNode

func (c *UK8SClient) AddUK8SUHostNode(req *AddUK8SUHostNodeRequest) (*AddUK8SUHostNodeResponse, error)

API: AddUK8SUHostNode

为UK8S集群添加一台Node节点,机型类型为云主机

func (*UK8SClient) CreateUK8SClusterV2

API: CreateUK8SClusterV2

创建UK8S集群

func (*UK8SClient) DelUK8SCluster

func (c *UK8SClient) DelUK8SCluster(req *DelUK8SClusterRequest) (*DelUK8SClusterResponse, error)

API: DelUK8SCluster

删除UK8S集群

func (*UK8SClient) DelUK8SClusterNodeV2

API: DelUK8SClusterNodeV2

删除集群中的Node节点,删除前务必先将其中的Pod驱逐。

func (*UK8SClient) DescribeUK8SCluster added in v0.21.27

API: DescribeUK8SCluster

获取集群信息

func (*UK8SClient) DescribeUK8SImage

func (c *UK8SClient) DescribeUK8SImage(req *DescribeUK8SImageRequest) (*DescribeUK8SImageResponse, error)

API: DescribeUK8SImage

获取UK8S支持的Node节点操作系统,可基于该操作系统制定自定义镜像

func (*UK8SClient) DescribeUK8SNode added in v0.21.9

func (c *UK8SClient) DescribeUK8SNode(req *DescribeUK8SNodeRequest) (*DescribeUK8SNodeResponse, error)

API: DescribeUK8SNode

用于获取 UK8S 节点详情

func (*UK8SClient) GetClusterConfig added in v0.22.34

func (c *UK8SClient) GetClusterConfig(req *GetClusterConfigRequest) (*GetClusterConfigResponse, error)

API: GetClusterConfig

获取集群配置文件,管理集群的凭证

func (*UK8SClient) GetUK8SVersions added in v0.22.88

func (c *UK8SClient) GetUK8SVersions(req *GetUK8SVersionsRequest) (*GetUK8SVersionsResponse, error)

API: GetUK8SVersions

获取支持创建的UK8S集群版本、Containerd版本

func (*UK8SClient) ListUK8SClusterNodeV2

API: ListUK8SClusterNodeV2

获取UK8S集群节点信息

func (*UK8SClient) ListUK8SClusterV2

func (c *UK8SClient) ListUK8SClusterV2(req *ListUK8SClusterV2Request) (*ListUK8SClusterV2Response, error)

API: ListUK8SClusterV2

获取UK8S集群列表信息

func (*UK8SClient) ListUK8SNodeGroup added in v0.21.31

func (c *UK8SClient) ListUK8SNodeGroup(req *ListUK8SNodeGroupRequest) (*ListUK8SNodeGroupResponse, error)

API: ListUK8SNodeGroup

列出UK8S节点池

func (*UK8SClient) NewAddUK8SExistingUHostRequest

func (c *UK8SClient) NewAddUK8SExistingUHostRequest() *AddUK8SExistingUHostRequest

NewAddUK8SExistingUHostRequest will create request of AddUK8SExistingUHost action.

func (*UK8SClient) NewAddUK8SNodeGroupRequest added in v0.21.31

func (c *UK8SClient) NewAddUK8SNodeGroupRequest() *AddUK8SNodeGroupRequest

NewAddUK8SNodeGroupRequest will create request of AddUK8SNodeGroup action.

func (*UK8SClient) NewAddUK8SPHostNodeRequest

func (c *UK8SClient) NewAddUK8SPHostNodeRequest() *AddUK8SPHostNodeRequest

NewAddUK8SPHostNodeRequest will create request of AddUK8SPHostNode action.

func (*UK8SClient) NewAddUK8SUHostNodeRequest

func (c *UK8SClient) NewAddUK8SUHostNodeRequest() *AddUK8SUHostNodeRequest

NewAddUK8SUHostNodeRequest will create request of AddUK8SUHostNode action.

func (*UK8SClient) NewCreateUK8SClusterV2Request

func (c *UK8SClient) NewCreateUK8SClusterV2Request() *CreateUK8SClusterV2Request

NewCreateUK8SClusterV2Request will create request of CreateUK8SClusterV2 action.

func (*UK8SClient) NewDelUK8SClusterNodeV2Request

func (c *UK8SClient) NewDelUK8SClusterNodeV2Request() *DelUK8SClusterNodeV2Request

NewDelUK8SClusterNodeV2Request will create request of DelUK8SClusterNodeV2 action.

func (*UK8SClient) NewDelUK8SClusterRequest

func (c *UK8SClient) NewDelUK8SClusterRequest() *DelUK8SClusterRequest

NewDelUK8SClusterRequest will create request of DelUK8SCluster action.

func (*UK8SClient) NewDescribeUK8SClusterRequest added in v0.21.27

func (c *UK8SClient) NewDescribeUK8SClusterRequest() *DescribeUK8SClusterRequest

NewDescribeUK8SClusterRequest will create request of DescribeUK8SCluster action.

func (*UK8SClient) NewDescribeUK8SImageRequest

func (c *UK8SClient) NewDescribeUK8SImageRequest() *DescribeUK8SImageRequest

NewDescribeUK8SImageRequest will create request of DescribeUK8SImage action.

func (*UK8SClient) NewDescribeUK8SNodeRequest added in v0.21.9

func (c *UK8SClient) NewDescribeUK8SNodeRequest() *DescribeUK8SNodeRequest

NewDescribeUK8SNodeRequest will create request of DescribeUK8SNode action.

func (*UK8SClient) NewGetClusterConfigRequest added in v0.22.34

func (c *UK8SClient) NewGetClusterConfigRequest() *GetClusterConfigRequest

NewGetClusterConfigRequest will create request of GetClusterConfig action.

func (*UK8SClient) NewGetUK8SVersionsRequest added in v0.22.88

func (c *UK8SClient) NewGetUK8SVersionsRequest() *GetUK8SVersionsRequest

NewGetUK8SVersionsRequest will create request of GetUK8SVersions action.

func (*UK8SClient) NewListUK8SClusterNodeV2Request

func (c *UK8SClient) NewListUK8SClusterNodeV2Request() *ListUK8SClusterNodeV2Request

NewListUK8SClusterNodeV2Request will create request of ListUK8SClusterNodeV2 action.

func (*UK8SClient) NewListUK8SClusterV2Request

func (c *UK8SClient) NewListUK8SClusterV2Request() *ListUK8SClusterV2Request

NewListUK8SClusterV2Request will create request of ListUK8SClusterV2 action.

func (*UK8SClient) NewListUK8SNodeGroupRequest added in v0.21.31

func (c *UK8SClient) NewListUK8SNodeGroupRequest() *ListUK8SNodeGroupRequest

NewListUK8SNodeGroupRequest will create request of ListUK8SNodeGroup action.

func (*UK8SClient) NewRemoveUK8SNodeGroupRequest added in v0.21.31

func (c *UK8SClient) NewRemoveUK8SNodeGroupRequest() *RemoveUK8SNodeGroupRequest

NewRemoveUK8SNodeGroupRequest will create request of RemoveUK8SNodeGroup action.

func (*UK8SClient) RemoveUK8SNodeGroup added in v0.21.31

API: RemoveUK8SNodeGroup

删除UK8S节点池

type UK8SVersionData added in v0.22.88

type UK8SVersionData struct {

	// Containerd 版本
	ContainerdVersion string

	// K8S 版本
	K8sVersion string
}

UK8SVersionData - UK8S版本信息

type UhostInfo added in v0.21.27

type UhostInfo struct {

	// 基础镜像名称
	BasicImageName string

	// Cpu数量
	CPU int

	// 创建时间
	CreateTime int

	// 节点磁盘信息
	DiskSet []DiskSet

	// 到期时间
	ExpireTime int

	// GPU 数量
	GPU int

	// GPU 型号
	GpuType string

	// 节点IP信息
	IPSet []IPSet

	// 主机机型类别
	MachineType string

	// 内存
	Memory int

	// 主机名称
	Name string

	// 主机ID
	NodeId string

	// 节点类型:uhost表示云主机;uphost表示物理云主机
	NodeType string

	// 镜像信息
	OsName string

	// 操作系统类型
	OsType string

	// 节点关联的安全组列表
	SecGroupId []SecGroupId

	// 主机状态
	State string

	// 节点总磁盘空间
	TotalDiskSpace int

	// 所在机房
	Zone string
}

UhostInfo - 机器信息

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL