Skip to content

KubernetesCluster

This class encapsulates and extends the ROS resource type DATASOURCE::CS::KubernetesCluster, which is used to query the information about a Container Service for Kubernetes (ACK) cluster.

Initializers

import { datasource } from '@alicloud/ros-cdk-cs'
new datasource.KubernetesCluster(scope: Construct, id: string, props?: KubernetesClusterProps, enableResourcePropertyConstraint?: boolean)
Name Type Description
scope @alicloud/ros-cdk-core.Construct No description.
id string No description.
props KubernetesClusterProps No description.
enableResourcePropertyConstraint boolean No description.

scopeRequired

  • Type: @alicloud/ros-cdk-core.Construct

idRequired

  • Type: string

propsOptional


enableResourcePropertyConstraintOptional

  • Type: boolean

Methods

Name Description
toString Returns a string representation of this construct.
synthesize Allows this construct to emit artifacts into the cloud assembly during synthesis.
addCondition No description.
addCount No description.
addDependency No description.
addResourceDesc No description.
applyRemovalPolicy No description.
getAtt No description.
setMetadata No description.

toString

public toString(): string

Returns a string representation of this construct.

synthesize

public synthesize(session: ISynthesisSession): void

Allows this construct to emit artifacts into the cloud assembly during synthesis.

This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.

sessionRequired

  • Type: @alicloud/ros-cdk-core.ISynthesisSession

The synthesis session.


addCondition

public addCondition(condition: RosCondition): void

conditionRequired

  • Type: @alicloud/ros-cdk-core.RosCondition

addCount

public addCount(count: number | IResolvable): void

countRequired

  • Type: number | @alicloud/ros-cdk-core.IResolvable

addDependency

public addDependency(resource: Resource): void

resourceRequired

  • Type: @alicloud/ros-cdk-core.Resource

addResourceDesc

public addResourceDesc(desc: string): void

descRequired

  • Type: string

applyRemovalPolicy

public applyRemovalPolicy(policy: RemovalPolicy): void

policyRequired

  • Type: @alicloud/ros-cdk-core.RemovalPolicy

getAtt

public getAtt(name: string): IResolvable

nameRequired

  • Type: string

setMetadata

public setMetadata(key: string, value: any): void

keyRequired

  • Type: string

valueRequired

  • Type: any

Static Functions

Name Description
isConstruct Return whether the given object is a Construct.

isConstruct

import { datasource } from '@alicloud/ros-cdk-cs'
datasource.KubernetesCluster.isConstruct(x: any)

Return whether the given object is a Construct.

xRequired

  • Type: any

Properties

Name Type Description
node @alicloud/ros-cdk-core.ConstructNode The construct tree node associated with this construct.
ref string No description.
stack @alicloud/ros-cdk-core.Stack The stack in which this resource is defined.
resource @alicloud/ros-cdk-core.RosResource No description.
attrClusterId @alicloud/ros-cdk-core.IResolvable Attribute ClusterId: Cluster instance ID.
attrClusterSpec @alicloud/ros-cdk-core.IResolvable Attribute ClusterSpec: The type of the managed Kubernetes cluster.
attrClusterType @alicloud/ros-cdk-core.IResolvable Attribute ClusterType: The type of the cluster.
attrCreated @alicloud/ros-cdk-core.IResolvable Attribute Created: The time when the cluster was created.
attrCurrentVersion @alicloud/ros-cdk-core.IResolvable Attribute CurrentVersion: The current Kubernetes version of the cluster.
attrDeletionProtection @alicloud/ros-cdk-core.IResolvable Attribute DeletionProtection: Indicates whether deletion protection is enabled.
attrDockerVersion @alicloud/ros-cdk-core.IResolvable Attribute DockerVersion: The Docker version that is used by the cluster.
attrExternalLoadbalancerId @alicloud/ros-cdk-core.IResolvable Attribute ExternalLoadbalancerId: The ID of the Server Load Balancer (SLB) instance that is used for the Ingress of the cluster.
attrInitVersion @alicloud/ros-cdk-core.IResolvable Attribute InitVersion: The Kubernetes version that is initially used by the cluster.
attrMaintenanceWindow @alicloud/ros-cdk-core.IResolvable Attribute MaintenanceWindow: The maintenance window of the cluster.
attrMasterUrl @alicloud/ros-cdk-core.IResolvable Attribute MasterUrl: The address of the cluster.
attrMetaData @alicloud/ros-cdk-core.IResolvable Attribute MetaData: The metadata of the cluster.
attrName @alicloud/ros-cdk-core.IResolvable Attribute Name: The name of the cluster.
attrNetworkMode @alicloud/ros-cdk-core.IResolvable Attribute NetworkMode: The network mode of the cluster.
attrNextVersion @alicloud/ros-cdk-core.IResolvable Attribute NextVersion: The Kubernetes version to which the cluster can be upgraded.
attrParameters @alicloud/ros-cdk-core.IResolvable Attribute Parameters: A collection of cluster ROS parameters.
attrPrivateZone @alicloud/ros-cdk-core.IResolvable Attribute PrivateZone: Indicates whether Alibaba Cloud DNS PrivateZone is enabled.
attrProfile @alicloud/ros-cdk-core.IResolvable Attribute Profile: Indicates the scenario in which the cluster is used.
attrRegionId @alicloud/ros-cdk-core.IResolvable Attribute RegionId: The ID of the region where the cluster is deployed.
attrResourceGroupId @alicloud/ros-cdk-core.IResolvable Attribute ResourceGroupId: The ID of the resource group to which the cluster belongs.
attrSecurityGroupId @alicloud/ros-cdk-core.IResolvable Attribute SecurityGroupId: The ID of the security group to which the instances of the cluster belong.
attrSize @alicloud/ros-cdk-core.IResolvable Attribute Size: The number of nodes in the cluster.
attrState @alicloud/ros-cdk-core.IResolvable Attribute State: The state of the cluster.
attrSubnetCidr @alicloud/ros-cdk-core.IResolvable Attribute SubnetCidr: The pod CIDR block.
attrTags @alicloud/ros-cdk-core.IResolvable Attribute Tags: The labels of the cluster.
attrUpdated @alicloud/ros-cdk-core.IResolvable Attribute Updated: The time when the cluster was updated.
attrVpcId @alicloud/ros-cdk-core.IResolvable Attribute VpcId: The ID of the VPC where the cluster is deployed.
attrVSwitchId @alicloud/ros-cdk-core.IResolvable Attribute VSwitchId: The IDs of the vSwitches.
attrWorkerRamRoleName @alicloud/ros-cdk-core.IResolvable Attribute WorkerRamRoleName: The name of the worker RAM role.
attrZoneId @alicloud/ros-cdk-core.IResolvable Attribute ZoneId: The ID of the zone where the cluster is deployed.

nodeRequired

public readonly node: ConstructNode;
  • Type: @alicloud/ros-cdk-core.ConstructNode

The construct tree node associated with this construct.


refRequired

public readonly ref: string;
  • Type: string

stackRequired

public readonly stack: Stack;
  • Type: @alicloud/ros-cdk-core.Stack

The stack in which this resource is defined.


resourceOptional

public readonly resource: RosResource;
  • Type: @alicloud/ros-cdk-core.RosResource

attrClusterIdRequired

public readonly attrClusterId: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute ClusterId: Cluster instance ID.


attrClusterSpecRequired

public readonly attrClusterSpec: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute ClusterSpec: The type of the managed Kubernetes cluster.

This parameter is returned for a managed Kubernetes cluster. Valid values: - ack.pro.small: professional managed Kubernetes cluster. - ack.standard: standard managed Kubernetes cluster.


attrClusterTypeRequired

public readonly attrClusterType: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute ClusterType: The type of the cluster.

Valid values: - Kubernetes: dedicated Kubernetes cluster - ManagedKubernetes: managed Kubernetes cluster - Ask: ASK cluster - ExternalKubernetes: registered external Kubernetes cluster


attrCreatedRequired

public readonly attrCreated: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute Created: The time when the cluster was created.


attrCurrentVersionRequired

public readonly attrCurrentVersion: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute CurrentVersion: The current Kubernetes version of the cluster.

For more information about the Kubernetes versions supported by ACK, see Release notes for Kubernetes versions.


attrDeletionProtectionRequired

public readonly attrDeletionProtection: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute DeletionProtection: Indicates whether deletion protection is enabled.

If deletion protection is enabled, the cluster cannot be deleted in the ACK console or by calling the API. Valid values: - true: Deletion protection is enabled. You cannot delete the cluster in the ACK console or by calling the API. - false: Deletion protection is not enabled. You can delete the cluster in the ACK console or by calling the API.


attrDockerVersionRequired

public readonly attrDockerVersion: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute DockerVersion: The Docker version that is used by the cluster.


attrExternalLoadbalancerIdRequired

public readonly attrExternalLoadbalancerId: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute ExternalLoadbalancerId: The ID of the Server Load Balancer (SLB) instance that is used for the Ingress of the cluster.


attrInitVersionRequired

public readonly attrInitVersion: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute InitVersion: The Kubernetes version that is initially used by the cluster.


attrMaintenanceWindowRequired

public readonly attrMaintenanceWindow: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute MaintenanceWindow: The maintenance window of the cluster.

This feature is available in only professional managed Kubernetes clusters.


attrMasterUrlRequired

public readonly attrMasterUrl: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute MasterUrl: The address of the cluster.

It includes an internal endpoint and a public endpoint.


attrMetaDataRequired

public readonly attrMetaData: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute MetaData: The metadata of the cluster.


attrNameRequired

public readonly attrName: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute Name: The name of the cluster.

The name must be 1 to 63 characters in length, and can contain digits, letters, and hyphens (-). It cannot start with a hyphen (-).


attrNetworkModeRequired

public readonly attrNetworkMode: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute NetworkMode: The network mode of the cluster.

Valid values: - classic: the classic network - vpc: virtual private cloud (VPC) - overlay: overlay network - calico: network powered by Calico Default value: vpc.


attrNextVersionRequired

public readonly attrNextVersion: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute NextVersion: The Kubernetes version to which the cluster can be upgraded.


attrParametersRequired

public readonly attrParameters: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute Parameters: A collection of cluster ROS parameters.


attrPrivateZoneRequired

public readonly attrPrivateZone: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute PrivateZone: Indicates whether Alibaba Cloud DNS PrivateZone is enabled.

true: indicates that Alibaba Cloud DNS PrivateZone is enabled.- false: indicates that Alibaba Cloud DNS PrivateZone is not enabled.


attrProfileRequired

public readonly attrProfile: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute Profile: Indicates the scenario in which the cluster is used.

Valid values: - Default: indicates that the cluster is used in non-edge computing scenarios. - Edge: indicates that the ACK cluster is used in edge computing scenarios.


attrRegionIdRequired

public readonly attrRegionId: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute RegionId: The ID of the region where the cluster is deployed.


attrResourceGroupIdRequired

public readonly attrResourceGroupId: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute ResourceGroupId: The ID of the resource group to which the cluster belongs.


attrSecurityGroupIdRequired

public readonly attrSecurityGroupId: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute SecurityGroupId: The ID of the security group to which the instances of the cluster belong.


attrSizeRequired

public readonly attrSize: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute Size: The number of nodes in the cluster.

Master nodes and worker nodes are included.


attrStateRequired

public readonly attrState: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute State: The state of the cluster.

Valid values: - initial: The cluster is being created. - failed: The cluster failed to be created. - running: The cluster is running. - updating: The cluster is being upgraded. - updating_failed: The cluster failed to be upgraded. - scaling: The cluster is being scaled. - waiting: The registered cluster is waiting for connecting. - disconnected: The registeredcluster is disconnected. - stopped: The cluster is stopped. - deleting: The cluster is being deleted. - deleted: The cluster is deleted. - delete_failed: The cluster failed to be deleted.


attrSubnetCidrRequired

public readonly attrSubnetCidr: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute SubnetCidr: The pod CIDR block.

It must be a valid and private CIDR block, and must be one of the following CIDR blocks or their subnets: - 10.0.0.0/8 - 172.16-31.0.0/12-16 - 192.168.0.0/16 The pod CIDR block cannot overlap with that of the VPC or those of the ACK clusters that are deployed in the VPC. For more information about the network segmentation of ACK clusters, see Plan CIDR blocks for ACK clusters in a VPC.


attrTagsRequired

public readonly attrTags: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute Tags: The labels of the cluster.


attrUpdatedRequired

public readonly attrUpdated: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute Updated: The time when the cluster was updated.


attrVpcIdRequired

public readonly attrVpcId: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute VpcId: The ID of the VPC where the cluster is deployed.

This parameter is required when you create an ACK cluster.


attrVSwitchIdRequired

public readonly attrVSwitchId: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute VSwitchId: The IDs of the vSwitches.

You can select one to three vSwitches when you create an ACK cluster. vSwitches in different zones are recommended to ensure high availability.


attrWorkerRamRoleNameRequired

public readonly attrWorkerRamRoleName: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute WorkerRamRoleName: The name of the worker RAM role.

The RAM role is assigned to the worker nodes of the cluster and allows the worker nodes to manage Elastic Compute Service (ECS) instances.


attrZoneIdRequired

public readonly attrZoneId: IResolvable;
  • Type: @alicloud/ros-cdk-core.IResolvable

Attribute ZoneId: The ID of the zone where the cluster is deployed.