Skip to content

KubernetesClusterProps

Properties for defining a KubernetesCluster.

See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-cs-kubernetescluster

Initializer

using AlibabaCloud.SDK.ROS.CDK.Cs;
new KubernetesClusterProps {
    object MasterInstanceTypes,
    object MasterVSwitchIds,
    object Name,
    object VpcId,
    object WorkerVSwitchIds,
    object Addons = null,
    object AutoRenew = null,
    object AutoRenewPeriod = null,
    object ChargeType = null,
    object CloudMonitorFlags = null,
    object ContainerCidr = null,
    object CpuPolicy = null,
    object DeleteOptions = null,
    object DeletionProtection = null,
    object DisableRollback = null,
    object EndpointPublicAccess = null,
    object FormatDisk = null,
    object IsEnterpriseSecurityGroup = null,
    object KeepInstanceName = null,
    object KeyPair = null,
    object KubernetesVersion = null,
    object LoadBalancerSpec = null,
    object LoginPassword = null,
    object MasterCount = null,
    object MasterDataDisk = null,
    object MasterDataDisks = null,
    object MasterSystemDiskCategory = null,
    object MasterSystemDiskPerformanceLevel = null,
    object MasterSystemDiskSize = null,
    object MasterSystemDiskSnapshotPolicyId = null,
    object MasterZoneIds = null,
    object NodeCidrMask = null,
    object NodeNameMode = null,
    object NodePools = null,
    object NodePortRange = null,
    object NumOfNodes = null,
    object OsType = null,
    object Period = null,
    object PeriodUnit = null,
    object Platform = null,
    object PodVswitchIds = null,
    object ProxyMode = null,
    object ResourceGroupId = null,
    object Runtime = null,
    object SecurityGroupId = null,
    object SecurityHardeningOs = null,
    object ServiceCidr = null,
    object SnatEntry = null,
    object SocEnabled = null,
    object SshFlags = null,
    TagsProperty[] Tags = null,
    object Taint = null,
    object TimeoutMins = null,
    object TimeZone = null,
    object UserCa = null,
    object UserData = null,
    object WorkerDataDisk = null,
    object WorkerDataDisks = null,
    object WorkerInstanceTypes = null,
    object WorkerSystemDiskCategory = null,
    object WorkerSystemDiskSize = null,
    object WorkerSystemDiskSnapshotPolicyId = null,
    object WorkerZoneIds = null
};

Properties

Name Type Description
MasterInstanceTypes object Property masterInstanceTypes: Master node ECS specification type code.
MasterVSwitchIds object Property masterVSwitchIds: Master node switch ID.
Name object Property name: The name of the cluster.
VpcId object Property vpcId: VPC ID.
WorkerVSwitchIds object Property workerVSwitchIds: The virtual switch ID of the worker node.
Addons object Property addons: A combination of addon plugins for Kubernetes clusters.
AutoRenew object Property autoRenew: Whether the cluster automatically renews.
AutoRenewPeriod object Property autoRenewPeriod: Automatic renewal cycle, which takes effect when prepaid and automatic renewal are selected, and is required: When PeriodUnit = Week, the values are: {"1", "2", "3"} When PeriodUnit = Month, the value is {"1", "2", "3", "6", "12"} Default to 1.
ChargeType object Property chargeType: cluster payment type.
CloudMonitorFlags object Property cloudMonitorFlags: Whether to install the cloud monitoring plugin: true: indicates installation false: Do not install Default to false.
ContainerCidr object Property containerCidr: The container network segment cannot conflict with the VPC network segment.
CpuPolicy object Property cpuPolicy: CPU policy.
DeleteOptions object Property deleteOptions: Delete options, only work for deleting resource.
DeletionProtection object Property deletionProtection: Specifies whether to enable deletion protection for the cluster.
DisableRollback object Property disableRollback: Whether the failure was rolled back: true: indicates that it fails to roll back false: rollback failed The default is true.
EndpointPublicAccess object Property endpointPublicAccess: Whether to enable the public network API Server: true: which means that the public network API Server is open.
FormatDisk object Property formatDisk: Specifies whether to mount a data disk to nodes that are created on existing Elastic Compute Service (ECS) instances.
IsEnterpriseSecurityGroup object Property isEnterpriseSecurityGroup: Specifies whether to create an advanced security group.
KeepInstanceName object Property keepInstanceName: Specifies whether to retain the names of existing ECS instances that are used in the cluster.
KeyPair object Property keyPair: Key pair name.
KubernetesVersion object Property kubernetesVersion: The version of the Kubernetes cluster.
LoadBalancerSpec object Property loadBalancerSpec: The specification of the Server Load Balancer instance.
LoginPassword object Property loginPassword: SSH login password.
MasterCount object Property masterCount: Number of master instances.
MasterDataDisk object Property masterDataDisk: Whether the master node mounts data disks can be selected as: true: mount the data disk false: no data disk is mounted, default is false.
MasterDataDisks object Property masterDataDisks: Master data disk type, size and other configuration combinations.
MasterSystemDiskCategory object Property masterSystemDiskCategory: Master disk system disk type.
MasterSystemDiskPerformanceLevel object Property masterSystemDiskPerformanceLevel: The performance level of the enhanced SSD used as the Master node.
MasterSystemDiskSize object Property masterSystemDiskSize: Master disk system disk size in GiB.
MasterSystemDiskSnapshotPolicyId object Property masterSystemDiskSnapshotPolicyId: The ID of the policy that is used to back up the data disk of the master node.
MasterZoneIds object Property masterZoneIds: Zone ids of master node virtual switches belongs to.
NodeCidrMask object Property nodeCidrMask: The maximum number of IP addresses that can be assigned to nodes.
NodeNameMode object Property nodeNameMode: A custom node name consists of a prefix, an IP substring, and a suffix.
NodePools object Property nodePools: The configurations of Node pools.
NodePortRange object Property nodePortRange: Node service port.
NumOfNodes object Property numOfNodes: Number of worker nodes.
OsType object Property osType: The type of operating system.
Period object Property period: The duration of the annual subscription and monthly subscription.
PeriodUnit object Property periodUnit: When you specify PrePaid, you need to specify the period.
Platform object Property platform: The release version of the operating system.
PodVswitchIds object Property podVswitchIds: The list of pod vSwitches.
ProxyMode object Property proxyMode: kube-proxy proxy mode, supports both iptables and ipvs modes.
ResourceGroupId object Property resourceGroupId: The ID of resource group.
Runtime object Property runtime: The container runtime of the cluster.
SecurityGroupId object Property securityGroupId: Specifies the ID of the security group to which the cluster ECS instance belongs.
SecurityHardeningOs object Property securityHardeningOs: Alibaba Cloud OS security hardening.
ServiceCidr object Property serviceCidr: The service network segment cannot conflict with the VPC network segment and the container network segment.
SnatEntry object Property snatEntry: Whether to configure SNAT for the network.
SocEnabled object Property socEnabled: Valid values: true: enables reinforcement based on classified protection.
SshFlags object Property sshFlags: Whether to enable public network SSH login: true: open false: not open.
Tags TagsProperty[] Property tags: Tag the cluster.
Taint object Property taint: It is used to mark nodes with taints.
TimeoutMins object Property timeoutMins: Cluster resource stack creation timeout, in minutes.
TimeZone object Property timeZone: The time zone of the cluster.
UserCa object Property userCa: The CA of cluster.
UserData object Property userData: The user-defined data.
WorkerDataDisk object Property workerDataDisk: Whether to mount the data disk.
WorkerDataDisks object Property workerDataDisks: A combination of configurations such as worker data disk type and size.
WorkerInstanceTypes object Property workerInstanceTypes: Worker node ECS specification type code.
WorkerSystemDiskCategory object Property workerSystemDiskCategory: Worker node system disk type.
WorkerSystemDiskSize object Property workerSystemDiskSize: Worker disk system disk size, the unit is GiB.
WorkerSystemDiskSnapshotPolicyId object Property workerSystemDiskSnapshotPolicyId: The ID of the policy that is used to back up the data disk of the worker node.
WorkerZoneIds object Property workerZoneIds: Zone ids of worker node virtual switches belongs to.

MasterInstanceTypesRequired

public object MasterInstanceTypes { get; set; }
  • Type: object

Property masterInstanceTypes: Master node ECS specification type code.

For more details, see Instance Type Family. Each item correspond to MasterVSwitchIds. List size must be 3, Instance Type can be repeated.


MasterVSwitchIdsRequired

public object MasterVSwitchIds { get; set; }
  • Type: object

Property masterVSwitchIds: Master node switch ID.

To ensure high availability of the cluster, it is recommended that you select 3 switches and distribute them in different Availability Zones.


NameRequired

public object Name { get; set; }
  • Type: object

Property name: The name of the cluster.

The cluster name can use uppercase and lowercase letters, Chinese characters, numbers, and dashes.


VpcIdRequired

public object VpcId { get; set; }
  • Type: object

Property vpcId: VPC ID.


WorkerVSwitchIdsRequired

public object WorkerVSwitchIds { get; set; }
  • Type: object

Property workerVSwitchIds: The virtual switch ID of the worker node.


AddonsOptional

public object Addons { get; set; }
  • Type: object

Property addons: A combination of addon plugins for Kubernetes clusters.

Network plug-in: including Flannel and Terway network plug-ins Log service: Optional. If the log service is not enabled, the cluster audit function cannot be used. Ingress: The installation of the Ingress component is enabled by default.


AutoRenewOptional

public object AutoRenew { get; set; }
  • Type: object

Property autoRenew: Whether the cluster automatically renews.

It takes effect when the value of ChargeType is PrePaid. The optional values are: true: automatic renewal false: do not renew automatically Default to true.


AutoRenewPeriodOptional

public object AutoRenewPeriod { get; set; }
  • Type: object

Property autoRenewPeriod: Automatic renewal cycle, which takes effect when prepaid and automatic renewal are selected, and is required: When PeriodUnit = Week, the values are: {"1", "2", "3"} When PeriodUnit = Month, the value is {"1", "2", "3", "6", "12"} Default to 1.


ChargeTypeOptional

public object ChargeType { get; set; }
  • Type: object

Property chargeType: cluster payment type.

The optional values are: PrePaid: prepaid PostPaid: Pay as you go Default to PostPaid.


CloudMonitorFlagsOptional

public object CloudMonitorFlags { get; set; }
  • Type: object

Property cloudMonitorFlags: Whether to install the cloud monitoring plugin: true: indicates installation false: Do not install Default to false.


ContainerCidrOptional

public object ContainerCidr { get; set; }
  • Type: object

Property containerCidr: The container network segment cannot conflict with the VPC network segment.

When the sytem is selected to automatically create a VPC, the network segment 172.16.0.0/16 is used by default.


CpuPolicyOptional

public object CpuPolicy { get; set; }
  • Type: object

Property cpuPolicy: CPU policy.

The cluster version is 1.12.6 and above supports both static and none strategies.


DeleteOptionsOptional

public object DeleteOptions { get; set; }
  • Type: object

Property deleteOptions: Delete options, only work for deleting resource.


DeletionProtectionOptional

public object DeletionProtection { get; set; }
  • Type: object

Property deletionProtection: Specifies whether to enable deletion protection for the cluster.

After deletion protection is enabled, the cluster cannot be deleted in the ACK console or by calling API operations. Valid values:true: enables deletion protection for the cluster. false: disables deletion protection for the cluster. Default value: false.


DisableRollbackOptional

public object DisableRollback { get; set; }
  • Type: object

Property disableRollback: Whether the failure was rolled back: true: indicates that it fails to roll back false: rollback failed The default is true.

If rollback fails, resources produced during the creation process will be released. False is not recommended.


EndpointPublicAccessOptional

public object EndpointPublicAccess { get; set; }
  • Type: object

Property endpointPublicAccess: Whether to enable the public network API Server: true: which means that the public network API Server is open.

false: If set to false, the API server on the public network will not be created, only the API server on the private network will be created.Default to false.


FormatDiskOptional

public object FormatDisk { get; set; }
  • Type: object

Property formatDisk: Specifies whether to mount a data disk to nodes that are created on existing Elastic Compute Service (ECS) instances.

Valid values: true: stores the data of containers and images on a data disk. The original data on the disk will be overwritten. Back up data before you mount the disk. false: does not store the data of containers and images on a data disk. Default value: false. How to mount a data disk: If the ECS instances have data disks mounted and the file system of the last data disk is not initialized, the system automatically formats the data disk to ext4. Then, the system mounts the data disk to /var/lib/docker and /var/lib/kubelet. The system does not create or mount a new data disk if no data disk has been mounted to the ECS instances.


IsEnterpriseSecurityGroupOptional

public object IsEnterpriseSecurityGroup { get; set; }
  • Type: object

Property isEnterpriseSecurityGroup: Specifies whether to create an advanced security group.

This parameter takes effect only if security_group_id is left empty. Note You must specify an advanced security group for a cluster that has Terway installed. true: creates an advanced security group. false: does not create an advanced security group. Default value: false.


KeepInstanceNameOptional

public object KeepInstanceName { get; set; }
  • Type: object

Property keepInstanceName: Specifies whether to retain the names of existing ECS instances that are used in the cluster.

true: retains the names. false: does not retain the names. The new names are assigned by the system. Default value: true.


KeyPairOptional

public object KeyPair { get; set; }
  • Type: object

Property keyPair: Key pair name.

Specify one of KeyPair or LoginPassword.


KubernetesVersionOptional

public object KubernetesVersion { get; set; }
  • Type: object

Property kubernetesVersion: The version of the Kubernetes cluster.


LoadBalancerSpecOptional

public object LoadBalancerSpec { get; set; }
  • Type: object

Property loadBalancerSpec: The specification of the Server Load Balancer instance.

Allowed value: slb.s1.small|slb.s2.small|slb.s2.medium|slb.s3.small|slb.s3.medium|slb.s3.large


LoginPasswordOptional

public object LoginPassword { get; set; }
  • Type: object

Property loginPassword: SSH login password.

Password rules are 8-30 characters and contain three items (upper and lower case letters, numbers, and special symbols). Specify one of KeyPair or LoginPassword.


MasterCountOptional

public object MasterCount { get; set; }
  • Type: object

Property masterCount: Number of master instances.

The value can be 3 or 5. The default value is 3.


MasterDataDiskOptional

public object MasterDataDisk { get; set; }
  • Type: object

Property masterDataDisk: Whether the master node mounts data disks can be selected as: true: mount the data disk false: no data disk is mounted, default is false.


MasterDataDisksOptional

public object MasterDataDisks { get; set; }
  • Type: object

Property masterDataDisks: Master data disk type, size and other configuration combinations.

This parameter is valid only when the master node data disk is mounted.


MasterSystemDiskCategoryOptional

public object MasterSystemDiskCategory { get; set; }
  • Type: object

Property masterSystemDiskCategory: Master disk system disk type.

The value includes: cloud_efficiency: efficient cloud disk cloud_ssd: SSD cloud disk cloud_essd: ESSD cloud diskDefault to cloud_ssd.


MasterSystemDiskPerformanceLevelOptional

public object MasterSystemDiskPerformanceLevel { get; set; }
  • Type: object

Property masterSystemDiskPerformanceLevel: The performance level of the enhanced SSD used as the Master node.

Valid values: PL0|PL1|PL2|PL3


MasterSystemDiskSizeOptional

public object MasterSystemDiskSize { get; set; }
  • Type: object

Property masterSystemDiskSize: Master disk system disk size in GiB.

Default to 120.


MasterSystemDiskSnapshotPolicyIdOptional

public object MasterSystemDiskSnapshotPolicyId { get; set; }
  • Type: object

Property masterSystemDiskSnapshotPolicyId: The ID of the policy that is used to back up the data disk of the master node.


MasterZoneIdsOptional

public object MasterZoneIds { get; set; }
  • Type: object

Property masterZoneIds: Zone ids of master node virtual switches belongs to.


NodeCidrMaskOptional

public object NodeCidrMask { get; set; }
  • Type: object

Property nodeCidrMask: The maximum number of IP addresses that can be assigned to nodes.

This number is determined by the specified pod CIDR block. This parameter takes effect only if the cluster uses the Flannel plug-in.Default value: 25.


NodeNameModeOptional

public object NodeNameMode { get; set; }
  • Type: object

Property nodeNameMode: A custom node name consists of a prefix, an IP substring, and a suffix.

The format iscustomized,{prefix},{ip_substring},{suffix}, for example: customized,aliyun.com,5,test.

  • The prefix and suffix can contain one or more parts that are separated by periods (.). Each part can contain lowercase letters, digits, and hyphens (-). The node name must start and end with a lowercase letter or digit.
  • The IP substring length specifies the number of digits to be truncated from the end of the node IP address. Valid values: 5 to 12. For example, if the node IP address is 192.168.0.55, the prefix is aliyun.com, the IP substring length is 5, and the suffix is test, the node name will be aliyun.com00055test.

NodePoolsOptional

public object NodePools { get; set; }
  • Type: object

Property nodePools: The configurations of Node pools.


NodePortRangeOptional

public object NodePortRange { get; set; }
  • Type: object

Property nodePortRange: Node service port.

The value range is [30000, 65535]. Default to 30000-65535.


NumOfNodesOptional

public object NumOfNodes { get; set; }
  • Type: object

Property numOfNodes: Number of worker nodes.

The range is [0,300]. Default to 3.


OsTypeOptional

public object OsType { get; set; }
  • Type: object

Property osType: The type of operating system.

Valid values: Windows Linux Default value: Linux.


PeriodOptional

public object Period { get; set; }
  • Type: object

Property period: The duration of the annual subscription and monthly subscription.

It takes effect when the ChargeType value is PrePaid and is a required value. The value range is: When PeriodUnit = Week, Period values are: {"1", "2", "3", "4"} When PeriodUnit = Month, Period values are: {"1", "2", "3", "4", "5", "6", "7", "8", "9", "12", "24", "36", "48", "60"} When PeriodUnit = Year, Period values are: {"1", "2", "3", "4", "5"} Default to 1.


PeriodUnitOptional

public object PeriodUnit { get; set; }
  • Type: object

Property periodUnit: When you specify PrePaid, you need to specify the period.

The options are: Week: Time is measured in weeks Month: time in months Year: time in years Default to Month


PlatformOptional

public object Platform { get; set; }
  • Type: object

Property platform: The release version of the operating system.

Valid values: CentOS AliyunLinux QbootAliyunLinux Qboot Windows WindowsCore Default value: CentOS.


PodVswitchIdsOptional

public object PodVswitchIds { get; set; }
  • Type: object

Property podVswitchIds: The list of pod vSwitches.

For each vSwitch that is allocated to nodes, you must specify at least one pod vSwitch in the same zone. The pod vSwitches cannot be the same as the node vSwitches. We recommend that you set the mask length of the CIDR block to a value no greater than 19 for the pod vSwitches. The pod_vswitch_ids parameter is required when the Terway network plug-in is selected for the cluster.


ProxyModeOptional

public object ProxyMode { get; set; }
  • Type: object

Property proxyMode: kube-proxy proxy mode, supports both iptables and ipvs modes.

The default is iptables.


ResourceGroupIdOptional

public object ResourceGroupId { get; set; }
  • Type: object

Property resourceGroupId: The ID of resource group.


RuntimeOptional

public object Runtime { get; set; }
  • Type: object

Property runtime: The container runtime of the cluster.

The default runtime is Docker.


SecurityGroupIdOptional

public object SecurityGroupId { get; set; }
  • Type: object

Property securityGroupId: Specifies the ID of the security group to which the cluster ECS instance belongs.


SecurityHardeningOsOptional

public object SecurityHardeningOs { get; set; }
  • Type: object

Property securityHardeningOs: Alibaba Cloud OS security hardening.

Value: true: enables security hardening OS. false: disables security hardening OS. Default value: false.


ServiceCidrOptional

public object ServiceCidr { get; set; }
  • Type: object

Property serviceCidr: The service network segment cannot conflict with the VPC network segment and the container network segment.

When the system is selected to automatically create a VPC, the network segment 172.19.0.0/20 is used by default.


SnatEntryOptional

public object SnatEntry { get; set; }
  • Type: object

Property snatEntry: Whether to configure SNAT for the network.

When a VPC can access the public network environment, set it to false. When an existing VPC cannot access the public network environment: When set to True, SNAT is configured and the public network environment can be accessed at this time. If set to false, it means that SNAT is not configured and the public network environment cannot be accessed at this time. Default to true.


SocEnabledOptional

public object SocEnabled { get; set; }
  • Type: object

Property socEnabled: Valid values: true: enables reinforcement based on classified protection.

false: disables reinforcement based on classified protection. Default value: false.


SshFlagsOptional

public object SshFlags { get; set; }
  • Type: object

Property sshFlags: Whether to enable public network SSH login: true: open false: not open.


TagsOptional

public TagsProperty[] Tags { get; set; }

Property tags: Tag the cluster.


TaintOptional

public object Taint { get; set; }
  • Type: object

Property taint: It is used to mark nodes with taints.

It is usually used for the scheduling strategy of Pods. The corresponding concept is: tolerance. If there is a corresponding tolerance mark on the Pods, the stain on the node can be tolerated and scheduled to the node.


TimeoutMinsOptional

public object TimeoutMins { get; set; }
  • Type: object

Property timeoutMins: Cluster resource stack creation timeout, in minutes.

The default value is 60.


TimeZoneOptional

public object TimeZone { get; set; }
  • Type: object

Property timeZone: The time zone of the cluster.


UserCaOptional

public object UserCa { get; set; }
  • Type: object

Property userCa: The CA of cluster.


UserDataOptional

public object UserData { get; set; }
  • Type: object

Property userData: The user-defined data.

[1, 16KB] characters.User data should not be base64 encoded. If you want to pass base64 encoded string to the property, use function Fn::Base64Decode to decode the base64 string first.


WorkerDataDiskOptional

public object WorkerDataDisk { get; set; }
  • Type: object

Property workerDataDisk: Whether to mount the data disk.

The options are as follows: true: indicates that the worker node mounts data disks. false: indicates that the worker node does not mount data disks. Default to false.


WorkerDataDisksOptional

public object WorkerDataDisks { get; set; }
  • Type: object

Property workerDataDisks: A combination of configurations such as worker data disk type and size.

This parameter is valid only when the worker node data disk is mounted.


WorkerInstanceTypesOptional

public object WorkerInstanceTypes { get; set; }
  • Type: object

Property workerInstanceTypes: Worker node ECS specification type code.

For more details, see Instance Specification Family.


WorkerSystemDiskCategoryOptional

public object WorkerSystemDiskCategory { get; set; }
  • Type: object

Property workerSystemDiskCategory: Worker node system disk type.

The value includes: cloud_efficiency: efficient cloud disk cloud_ssd: SSD cloud disk Default to cloud_efficiency.


WorkerSystemDiskSizeOptional

public object WorkerSystemDiskSize { get; set; }
  • Type: object

Property workerSystemDiskSize: Worker disk system disk size, the unit is GiB.

Default to 120.


WorkerSystemDiskSnapshotPolicyIdOptional

public object WorkerSystemDiskSnapshotPolicyId { get; set; }
  • Type: object

Property workerSystemDiskSnapshotPolicyId: The ID of the policy that is used to back up the data disk of the worker node.


WorkerZoneIdsOptional

public object WorkerZoneIds { get; set; }
  • Type: object

Property workerZoneIds: Zone ids of worker node virtual switches belongs to.