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. |
scope
Required
- Type: @alicloud/ros-cdk-core.Construct
id
Required
- Type: string
props
Optional
- Type: KubernetesClusterProps
enableResourcePropertyConstraint
Optional
- 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.
- Type: @alicloud/ros-cdk-core.ISynthesisSession
The synthesis session.
addCondition
public addCondition(condition: RosCondition): void
- Type: @alicloud/ros-cdk-core.RosCondition
addCount
public addCount(count: number | IResolvable): void
- Type: number | @alicloud/ros-cdk-core.IResolvable
addDependency
public addDependency(resource: Resource): void
- Type: @alicloud/ros-cdk-core.Resource
addResourceDesc
public addResourceDesc(desc: string): void
- Type: string
applyRemovalPolicy
public applyRemovalPolicy(policy: RemovalPolicy): void
- Type: @alicloud/ros-cdk-core.RemovalPolicy
getAtt
public getAtt(name: string): IResolvable
- Type: string
setMetadata
public setMetadata(key: string, value: any): void
- Type: string
- 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.
- 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. |
node
Required
public readonly node: ConstructNode;
- Type: @alicloud/ros-cdk-core.ConstructNode
The construct tree node associated with this construct.
ref
Required
public readonly ref: string;
- Type: string
stack
Required
public readonly stack: Stack;
- Type: @alicloud/ros-cdk-core.Stack
The stack in which this resource is defined.
resource
Optional
public readonly resource: RosResource;
- Type: @alicloud/ros-cdk-core.RosResource
attrClusterId
Required
public readonly attrClusterId: IResolvable;
- Type: @alicloud/ros-cdk-core.IResolvable
Attribute ClusterId: Cluster instance ID.
attrClusterSpec
Required
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.
attrClusterType
Required
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
attrCreated
Required
public readonly attrCreated: IResolvable;
- Type: @alicloud/ros-cdk-core.IResolvable
Attribute Created: The time when the cluster was created.
attrCurrentVersion
Required
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.
attrDeletionProtection
Required
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.
attrDockerVersion
Required
public readonly attrDockerVersion: IResolvable;
- Type: @alicloud/ros-cdk-core.IResolvable
Attribute DockerVersion: The Docker version that is used by the cluster.
attrExternalLoadbalancerId
Required
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.
attrInitVersion
Required
public readonly attrInitVersion: IResolvable;
- Type: @alicloud/ros-cdk-core.IResolvable
Attribute InitVersion: The Kubernetes version that is initially used by the cluster.
attrMaintenanceWindow
Required
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.
attrMasterUrl
Required
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.
attrMetaData
Required
public readonly attrMetaData: IResolvable;
- Type: @alicloud/ros-cdk-core.IResolvable
Attribute MetaData: The metadata of the cluster.
attrName
Required
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 (-).
attrNetworkMode
Required
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.
attrNextVersion
Required
public readonly attrNextVersion: IResolvable;
- Type: @alicloud/ros-cdk-core.IResolvable
Attribute NextVersion: The Kubernetes version to which the cluster can be upgraded.
attrParameters
Required
public readonly attrParameters: IResolvable;
- Type: @alicloud/ros-cdk-core.IResolvable
Attribute Parameters: A collection of cluster ROS parameters.
attrPrivateZone
Required
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.
attrProfile
Required
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.
attrRegionId
Required
public readonly attrRegionId: IResolvable;
- Type: @alicloud/ros-cdk-core.IResolvable
Attribute RegionId: The ID of the region where the cluster is deployed.
attrResourceGroupId
Required
public readonly attrResourceGroupId: IResolvable;
- Type: @alicloud/ros-cdk-core.IResolvable
Attribute ResourceGroupId: The ID of the resource group to which the cluster belongs.
attrSecurityGroupId
Required
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.
attrSize
Required
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.
attrState
Required
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.
attrSubnetCidr
Required
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.
attrTags
Required
public readonly attrTags: IResolvable;
- Type: @alicloud/ros-cdk-core.IResolvable
Attribute Tags: The labels of the cluster.
attrUpdated
Required
public readonly attrUpdated: IResolvable;
- Type: @alicloud/ros-cdk-core.IResolvable
Attribute Updated: The time when the cluster was updated.
attrVpcId
Required
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.
attrVSwitchId
Required
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.
attrWorkerRamRoleName
Required
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.
attrZoneId
Required
public readonly attrZoneId: IResolvable;
- Type: @alicloud/ros-cdk-core.IResolvable
Attribute ZoneId: The ID of the zone where the cluster is deployed.