Data Types

Last updated: 2020-04-03 12:01:31

Cluster

Cluster information struct

Used by actions: DescribeClusters.

Name Type Description
ClusterId String Cluster ID
ClusterName String Cluster name
ClusterDescription String Cluster description
ClusterVersion String Cluster version. The default value is 1.10.5.
ClusterOs String Cluster operating system. centOS 7.2x86_64 or ubuntu 16.04.1 LTSx86_64. Default value: ubuntu 16.04.1 LTSx86_64
ClusterType String Cluster type. Managed cluster: MANAGED_CLUSTER; Self-deployed cluster: INDEPENDENT_CLUSTER.
ClusterNetworkSettings ClusterNetworkSettings Cluster network-related parameters
ClusterNodeNum Integer Current number of nodes in the cluster
ProjectId Integer ID of the project to which the cluster belongs
TagSpecification Array of TagSpecification
ClusterStatus String
Property String
ClusterMaterNodeNum Integer Number of master nodes currently in the cluster
ImageId String ID of the image used by the cluster
Note: this field may return null, indicating that no valid value is obtained.
OsCustomizeType String OsCustomizeType
Note: this field may return null, indicating that no valid value is obtained.
ContainerRuntime String Runtime environment of the cluster. Values can be docker or containerd.
Note: this field may return null, indicating that no valid value is obtained.
CreatedTime String Creation time
Note: this field may return null, indicating that no valid value is obtained.

ClusterAdvancedSettings

Cluster advanced configurations

Used by actions: CreateCluster.

Name Type Required Description
IPVS Boolean No Whether IPVS is enabled
AsEnabled Boolean No Whether auto-scaling is enabled for nodes in the cluster (Enabling this function is not supported when you create a cluster)
ContainerRuntime String No Type of runtime component used by the cluster. The types include "docker" and "containerd". Default value: docker
NodeNameType String No
ExtraArgs ClusterExtraArgs No Cluster custom parameter
NetworkType String No Cluster network type, which can be GR (Global Router) or VPC-CNI. The default value is GR.
IsNonStaticIpMode Boolean No Whether a cluster in VPC-CNI mode uses dynamic IP addresses. The default value is FALSE, which indicates that static IP addresses are used.

ClusterBasicSettings

Describes the basic configuration information of a cluster

Used by actions: CreateCluster.

Name Type Required Description
ClusterOs String No Cluster operating system. CentOS 7.2x86_64 or Ubuntu 16.04.1 LTSx86_64. Default value: Ubuntu 16.04.1 LTSx86_64
ClusterVersion String No Cluster version. The default value is 1.10.5.
ClusterName String No Cluster name
ClusterDescription String No Cluster description
VpcId String No VPC ID, in the format of vpc-xxx, which is required when you create an empty managed cluster.
ProjectId Integer No ID of the project to which the new resources in the cluster belong.
TagSpecification Array of TagSpecification No
OsCustomizeType String No
NeedWorkSecurityGroup Boolean No

ClusterCIDRSettings

Container networking parameters for the cluster

Used by actions: CreateCluster.

Name Type Required Description
ClusterCIDR String No CIDR used to assign container and service IPs for the cluster. It cannot conflict with the VPC’s CIDR or the CIDRs of other clusters in the same VPC
IgnoreClusterCIDRConflict Boolean No Whether to ignore ClusterCIDR conflict errors, which are not ignored by default
MaxNodePodNum Integer No Maximum number of pods on each node in the cluster
MaxClusterServiceNum Integer No Maximum number of cluster services
ServiceCIDR String No The CIDR block used to assign cluster service IP addresses. It must conflict with neither the VPC CIDR block nor with CIDR blocks of other clusters in the same VPC instance. The IP range must be within the private network IP range, such as 10.1.0.0/14, 192.168.0.1/18, and 172.16.0.0/16.
EniSubnetIds Array of String No Subnet ID of the ENI in VPC-CNI network mode
ClaimExpiredSeconds Integer No Repossession time of ENI IP addresses in VPC-CNI network mode, whose range is [300,15768000)

ClusterExtraArgs

Cluster master custom parameter

Used by actions: CreateCluster.

Name Type Required Description
KubeAPIServer Array of String No kube-apiserver custom parameter
Note: this field may return null, indicating that no valid value is obtained.
KubeControllerManager Array of String No kube-controller-manager custom parameter
Note: this field may return null, indicating that no valid value is obtained.
KubeScheduler Array of String No kube-scheduler custom parameter
Note: this field may return null, indicating that no valid value is obtained.

ClusterNetworkSettings

Cluster network-related parameters

Used by actions: DescribeClusters.

Name Type Required Description
ClusterCIDR String Yes CIDR used to assign container and service IPs for the cluster. It cannot conflict with the VPC’s CIDR or the CIDRs of other clusters in the same VPC.
IgnoreClusterCIDRConflict Boolean No Whether to ignore ClusterCIDR conflict errors. It defaults to not ignore.
MaxNodePodNum Integer No Maximum number of pods on each node in the cluster. Default value: 256
MaxClusterServiceNum Integer No Maximum number of cluster services. Default value: 256
Ipvs Boolean No Whether IPVS is enabled. Default value: disabled
VpcId String No Cluster VPC ID, which is required when you create an empty cluster; otherwise, it is automatically set to be consistent with that of the nodes in the cluster
Cni Boolean No Whether CNI is enabled for network plugin(s). Default value: enabled

DataDisk

Described the configuration and information of k8s node data disk.

Used by actions: AddExistedInstances、CreateCluster、CreateClusterInstances、DescribeClusterInstances.

Name Type Required Description
DiskType String Yes
FileSystem String Yes File system (ext3/ext4/xfs)
DiskSize Integer Yes
AutoFormatAndMount Boolean Yes Whether to automatically format and mount the disk
MountTarget String No

EnhancedService

Describes the configuration of enhanced services, such as Cloud Security and Cloud Monitor.

Used by actions: AddExistedInstances、CreateCluster.

Name Type Required Description
SecurityService RunSecurityServiceEnabled No Enables cloud security service. If this parameter is not specified, the cloud security service will be enabled by default.
MonitorService RunMonitorServiceEnabled No Enables cloud monitor service. If this parameter is not specified, the cloud monitor service will be enabled by default.

ExistedInstance

Information of existing instances

Used by actions: DescribeExistedInstances.

Name Type Description
Usable Boolean Whether the instance supports being added to the cluster (TRUE: support; FALSE: not support).
Note: This field may return null, indicating that no valid values can be obtained.
UnusableReason String Reason that the instance does not support being added.
Note: This field may return null, indicating that no valid values can be obtained.
AlreadyInCluster String ID of the cluster in which the instance currently resides.
Note: This field may return null, indicating that no valid values can be obtained.
InstanceId String Instance ID, in the format of ins-xxxxxxxx.
InstanceName String Instance name.
Note: This field may return null, indicating that no valid values can be obtained.
PrivateIpAddresses Array of String List of private IPs of the instance’s primary ENI.
Note: This field may return null, indicating that no valid values can be obtained.
PublicIpAddresses Array of String List of public IPs of the instance’s primary ENI.
Note: This field may return null, indicating that no valid values can be obtained.
CreatedTime Timestamp Creation time, which follows the ISO8601 standard and uses UTC time. Format: YYYY-MM-DDThh:mm:ssZ.
Note: This field may return null, indicating that no valid values can be obtained.
InstanceChargeType String Instance’s billing mode. Value range:
PREPAID: Prepaid (Monthly Subscription)
POSTPAID_BY_HOUR: Postpaid (Pay-as-you-go)
CDHPAID: CDH-paid. Only CDH is charged and instances on the CDH do not incur fees.
Note: This field may return null, indicating that no valid values can be obtained.
CPU Integer Instance’s number of CPU cores. Unit: cores.
Note: This field may return null, indicating that no valid values can be obtained.
Memory Integer Instance’s memory capacity. Unit: GB.
Note: This field may return null, indicating that no valid values can be obtained.
OsName String Operating system name.
Note: This field may return null, indicating that no valid values can be obtained.
InstanceType String Instance model.
Note: This field may return null, indicating that no valid values can be obtained.

ExistedInstancesForNode

Configuration parameters of existing nodes in different roles

Used by actions: CreateCluster.

Name Type Required Description
NodeRole String Yes Node role. Values: MASTER_ETCD, WORKER. You only need to specify MASTER_ETCD when creating a self-deployed cluster (INDEPENDENT_CLUSTER).
ExistedInstancesPara ExistedInstancesPara Yes Reinstallation parameter of existing instances
InstanceAdvancedSettingsOverride InstanceAdvancedSettings No Advanced node setting, which overrides the InstanceAdvancedSettings item set at the cluster level (currently valid for the ExtraArgs node custom parameter only)

ExistedInstancesPara

Reinstallation parameter of existing instances

Used by actions: CreateCluster.

Name Type Required Description
InstanceIds Array of String Yes Cluster ID
InstanceAdvancedSettings InstanceAdvancedSettings No Additional parameter to be set for the instance
EnhancedService EnhancedService No Enhanced services. This parameter is used to specify whether to enable Cloud Security, Cloud Monitor and other services. If this parameter is not specified, Cloud Monitor and Cloud Security are enabled by default.
LoginSettings LoginSettings No Node login information (currently only supports using Password or single KeyIds)
SecurityGroupIds Array of String No Security group to which the instance belongs. This parameter can be obtained from the sgId field in the returned values of DescribeSecurityGroups. If this parameter is not specified, the default security group is bound. (Currently, you can only set a single sgId)
HostName String No

Filter

Filter

Used by actions: DescribeClusters、DescribeExistedInstances.

Name Type Required Description
Name String Yes Attribute name. If more than one Filter exists, the logical relationship between these Filters is AND.
Values Array of String Yes Attribute value. If there are multiple Values for one Filter, the logical relationship between the Values under the same Filter is OR.

Instance

Cluster’s instance information

Used by actions: DescribeClusterInstances.

Name Type Description
InstanceId String Instance ID
InstanceRole String Node role: MASTER, WORKER, ETCD, MASTER_ETCD, and ALL. Default value: WORKER
FailedReason String Reason for instance exception (or initialization)
InstanceState String Instance status (running, initializing, or failed)
DrainStatus String Whether the instance is drained
Note: this field may return null, indicating that no valid value is obtained.
InstanceAdvancedSettings InstanceAdvancedSettings Node settings
Note: this field may return null, indicating that no valid value is obtained.
CreatedTime String Creation time

InstanceAdvancedSettings

Describes K8s cluster configuration and related information.

Used by actions: AddExistedInstances、CreateCluster、CreateClusterInstances、DescribeClusterInstances.

Name Type Required Description
MountTarget String No Data disk mount point. By default, no data disk is mounted. Data disks in ext3, ext4, or XFS file system formats will be mounted directly, while data disks in other file systems and unformatted data disks will automatically be formatted as ext4 and then mounted. Please back up your data in advance. This setting is only applicable to CVMs with a single data disk.
DockerGraphPath String No Specified value of dockerd --graph. Default value: /var/lib/docker
UserScript String No Base64-encoded user script, which will be executed after the K8s component starts running. You need to ensure the reentrant and retry logic of the script. The script and its log files can be viewed at the node path: /data/ccs_userscript/. If you want to initialize nodes before adding them to the scheduling list, you can use this parameter together with the unschedulable parameter. After the final initialization of userScript is completed, add the kubectl uncordon nodename --kubeconfig=/root/.kube/config command to enable the node for scheduling.
Unschedulable Integer No Sets whether the added node is schedulable. 0 (default): schedulable; other values: unschedulable. After node initialization is completed, you can run kubectl uncordon nodename to enable this node for scheduling.
Labels Array of Label No
DataDisks Array of DataDisk No
ExtraArgs InstanceExtraArgs No Information about node custom parameters

InstanceDataDiskMountSetting

Mounting configuration of the CVM instance data disk

Used by actions: CreateCluster.

Name Type Required Description
InstanceType String Yes CVM instance type
DataDisks Array of DataDisk Yes Data disk mounting information
Zone String Yes Availability zone where the CVM instance is located

InstanceExtraArgs

Node custom parameter

Used by actions: AddExistedInstances、CreateCluster、CreateClusterInstances、DescribeClusterInstances.

Name Type Required Description
Kubelet Array of String No Kubelet custom parameter
Note: this field may return null, indicating that no valid value is obtained.

Label

k8s tags, generally exist as an array

Used by actions: AddExistedInstances、CreateCluster、CreateClusterInstances、DescribeClusterInstances.

Name Type Required Description
Name String Yes
Value String Yes

LoginSettings

Describes login settings of an instance.

Used by actions: AddExistedInstances、CreateCluster.

Name Type Required Description
Password String No Login password of the instance. The password requirements vary among different operating systems:
  • For Linux instances, the password must be 8-30 characters long and contain at least two of the following types: [a-z], [A-Z], [0-9] and [( ) ` ~ ! @ # $ % ^ & * - + = | { } [ ] : ; ' , . ? / ].
  • For Windows instances, the password must be 12-30 characters long and contain at least three of the following categories: [a-z], [A-Z], [0-9] and [( ) ` ~ ! @ # $ % ^ & * - + = | { } [ ] : ; ' , . ? /].

    If this parameter is not specified, a random password will be generated and sent to you via the Message Center.
    Note: this field may return null, indicating that no valid value is obtained.
  • KeyIds Array of String No List of key IDs. After an instance is associated with a key, you can access the instance with the private key in the key pair. You can call DescribeKeyPairs to obtain KeyId. A key and password cannot be specified at the same time. Windows instances do not support keys. Currently, you can only specify one key when purchasing an instance.
    Note: this field may return null, indicating that no valid value is obtained.
    KeepImageLogin String No Whether to keep the original settings of an image. You cannot specify this parameter and Password or KeyIds.N at the same time. You can specify this parameter as TRUE only when you create an instance using a custom image, a shared image, or an imported image. Valid values:
  • TRUE: keep the login settings of the image
  • FALSE: do not keep the login settings of the image

    Default value: FALSE.
    Note: This field may return null, indicating that no valid value is found.
  • RouteInfo

    Object of cluster route

    Used by actions: DescribeClusterRoutes.

    Name Type Description
    RouteTableName String Route table name.
    DestinationCidrBlock String Destination CIDR.
    GatewayIp String Next hop address.

    RouteTableConflict

    Object of route table conflict

    Used by actions: DescribeRouteTableConflicts.

    Name Type Description
    RouteTableType String Route table type.
    RouteTableCidrBlock String Route table CIDR.
    Note: This field may return null, indicating that no valid values can be obtained.
    RouteTableName String Route table name.
    Note: This field may return null, indicating that no valid values can be obtained.
    RouteTableId String Route table ID.
    Note: This field may return null, indicating that no valid values can be obtained.

    RouteTableInfo

    Object of cluster route table

    Used by actions: DescribeClusterRouteTables.

    Name Type Description
    RouteTableName String Route table name.
    RouteTableCidrBlock String Route table CIDR.
    VpcId String VPC instance ID.

    RunInstancesForNode

    Node configuration parameters of different roles

    Used by actions: CreateCluster.

    Name Type Required Description
    NodeRole String Yes Node role. Values: MASTER_ETCD, WORKER. You only need to specify MASTER_ETCD when creating a self-deployed cluster (INDEPENDENT_CLUSTER).
    RunInstancesPara Array of String Yes Pass-through parameter for CVM creation in the format of a JSON string. For more information, see the API for creating a CVM instance. Pass any parameter other than common parameters. ImageId will be replaced with the image corresponding to the TKE cluster operating system.
    InstanceAdvancedSettingsOverrides Array of InstanceAdvancedSettings No An advanced node setting. This parameter overrides the InstanceAdvancedSettings item set at the cluster level and corresponds to RunInstancesPara in a one-to-one sequential manner (currently valid for the ExtraArgs node custom parameter only).

    RunMonitorServiceEnabled

    Describes information related to the Cloud Monitor service.

    Used by actions: AddExistedInstances、CreateCluster.

    Name Type Required Description
    Enabled Boolean No Whether to enable Cloud Monitor. Valid values:
  • TRUE: enable Cloud Monitor
  • FALSE: do not enable Cloud Monitor

    Default value: TRUE.
  • RunSecurityServiceEnabled

    Describes information related to the Cloud Security service.

    Used by actions: AddExistedInstances、CreateCluster.

    Name Type Required Description
    Enabled Boolean No Whether to enable Cloud Security. Valid values:
  • TRUE: enable Cloud Security
  • FALSE: do not enable Cloud Security

    Default value: TRUE.
  • TagSpecification

    List of tag descriptions. By specifying this parameter, you can bind tags to corresponding resource instances at the same time. Currently, only tags are bound to cloud host instances.

    Used by actions: CreateCluster、DescribeClusters.

    Name Type Required Description
    ResourceType String No
    Tags Array of Tag No