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 com.aliyun.ros.cdk.cs.datasource.KubernetesCluster;
KubernetesCluster.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
// .clusterId(java.lang.String)
// .clusterId(IResolvable)
// .refreshOptions(java.lang.String)
// .refreshOptions(IResolvable)
.build();
Name | Type | Description |
---|---|---|
scope |
com.aliyun.ros.cdk.core.Construct |
No description. |
id |
java.lang.String |
No description. |
enableResourcePropertyConstraint |
java.lang.Boolean |
No description. |
clusterId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property clusterId: Cluster instance ID. |
refreshOptions |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property refreshOptions: The refresh strategy for the datasource resource when the stack is updated. |
scope
Required
- Type: com.aliyun.ros.cdk.core.Construct
id
Required
- Type: java.lang.String
enableResourcePropertyConstraint
Optional
- Type: java.lang.Boolean
clusterId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property clusterId: Cluster instance ID.
refreshOptions
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property refreshOptions: The refresh strategy for the datasource resource when the stack is updated.
Valid values:
- Never: Never refresh the datasource resource when the stack is updated.
- Always: Always refresh the datasource resource when the stack is updated. Default is Never.
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 java.lang.String toString()
Returns a string representation of this construct.
synthesize
public void synthesize(ISynthesisSession session)
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: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
- Type: com.aliyun.ros.cdk.core.RemovalPolicy
getAtt
public IResolvable getAtt(java.lang.String name)
- Type: java.lang.String
setMetadata
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- Type: java.lang.Object
Static Functions
Name | Description |
---|---|
isConstruct |
Return whether the given object is a Construct. |
isConstruct
import com.aliyun.ros.cdk.cs.datasource.KubernetesCluster;
KubernetesCluster.isConstruct(java.lang.Object x)
Return whether the given object is a Construct.
- Type: java.lang.Object
Properties
Name | Type | Description |
---|---|---|
node |
com.aliyun.ros.cdk.core.ConstructNode |
The construct tree node associated with this construct. |
ref |
java.lang.String |
No description. |
stack |
com.aliyun.ros.cdk.core.Stack |
The stack in which this resource is defined. |
resource |
com.aliyun.ros.cdk.core.RosResource |
No description. |
attrClusterId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute ClusterId: Cluster instance ID. |
attrClusterSpec |
com.aliyun.ros.cdk.core.IResolvable |
Attribute ClusterSpec: The type of the managed Kubernetes cluster. |
attrClusterType |
com.aliyun.ros.cdk.core.IResolvable |
Attribute ClusterType: The type of the cluster. |
attrCreated |
com.aliyun.ros.cdk.core.IResolvable |
Attribute Created: The time when the cluster was created. |
attrCurrentVersion |
com.aliyun.ros.cdk.core.IResolvable |
Attribute CurrentVersion: The current Kubernetes version of the cluster. |
attrDeletionProtection |
com.aliyun.ros.cdk.core.IResolvable |
Attribute DeletionProtection: Indicates whether deletion protection is enabled. |
attrDockerVersion |
com.aliyun.ros.cdk.core.IResolvable |
Attribute DockerVersion: The Docker version that is used by the cluster. |
attrExternalLoadbalancerId |
com.aliyun.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 |
com.aliyun.ros.cdk.core.IResolvable |
Attribute InitVersion: The Kubernetes version that is initially used by the cluster. |
attrMaintenanceWindow |
com.aliyun.ros.cdk.core.IResolvable |
Attribute MaintenanceWindow: The maintenance window of the cluster. |
attrMasterUrl |
com.aliyun.ros.cdk.core.IResolvable |
Attribute MasterUrl: The address of the cluster. |
attrMetaData |
com.aliyun.ros.cdk.core.IResolvable |
Attribute MetaData: The metadata of the cluster. |
attrName |
com.aliyun.ros.cdk.core.IResolvable |
Attribute Name: The name of the cluster. |
attrNetworkMode |
com.aliyun.ros.cdk.core.IResolvable |
Attribute NetworkMode: The network mode of the cluster. |
attrNextVersion |
com.aliyun.ros.cdk.core.IResolvable |
Attribute NextVersion: The Kubernetes version to which the cluster can be upgraded. |
attrParameters |
com.aliyun.ros.cdk.core.IResolvable |
Attribute Parameters: A collection of cluster ROS parameters. |
attrPrivateZone |
com.aliyun.ros.cdk.core.IResolvable |
Attribute PrivateZone: Indicates whether Alibaba Cloud DNS PrivateZone is enabled. |
attrProfile |
com.aliyun.ros.cdk.core.IResolvable |
Attribute Profile: Indicates the scenario in which the cluster is used. |
attrRegionId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute RegionId: The ID of the region where the cluster is deployed. |
attrResourceGroupId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute ResourceGroupId: The ID of the resource group to which the cluster belongs. |
attrSecurityGroupId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute SecurityGroupId: The ID of the security group to which the instances of the cluster belong. |
attrSize |
com.aliyun.ros.cdk.core.IResolvable |
Attribute Size: The number of nodes in the cluster. |
attrState |
com.aliyun.ros.cdk.core.IResolvable |
Attribute State: The state of the cluster. |
attrSubnetCidr |
com.aliyun.ros.cdk.core.IResolvable |
Attribute SubnetCidr: The pod CIDR block. |
attrTags |
com.aliyun.ros.cdk.core.IResolvable |
Attribute Tags: The labels of the cluster. |
attrUpdated |
com.aliyun.ros.cdk.core.IResolvable |
Attribute Updated: The time when the cluster was updated. |
attrVpcId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute VpcId: The ID of the VPC where the cluster is deployed. |
attrVSwitchId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute VSwitchId: The IDs of the vSwitches. |
attrWorkerRamRoleName |
com.aliyun.ros.cdk.core.IResolvable |
Attribute WorkerRamRoleName: The name of the worker RAM role. |
attrZoneId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute ZoneId: The ID of the zone where the cluster is deployed. |
node
Required
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
ref
Required
public java.lang.String getRef();
- Type: java.lang.String
stack
Required
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resource
Optional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrClusterId
Required
public IResolvable getAttrClusterId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute ClusterId: Cluster instance ID.
attrClusterSpec
Required
public IResolvable getAttrClusterSpec();
- Type: com.aliyun.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 IResolvable getAttrClusterType();
- Type: com.aliyun.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 IResolvable getAttrCreated();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute Created: The time when the cluster was created.
attrCurrentVersion
Required
public IResolvable getAttrCurrentVersion();
- Type: com.aliyun.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 IResolvable getAttrDeletionProtection();
- Type: com.aliyun.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 IResolvable getAttrDockerVersion();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute DockerVersion: The Docker version that is used by the cluster.
attrExternalLoadbalancerId
Required
public IResolvable getAttrExternalLoadbalancerId();
- Type: com.aliyun.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 IResolvable getAttrInitVersion();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute InitVersion: The Kubernetes version that is initially used by the cluster.
attrMaintenanceWindow
Required
public IResolvable getAttrMaintenanceWindow();
- Type: com.aliyun.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 IResolvable getAttrMasterUrl();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute MasterUrl: The address of the cluster.
It includes an internal endpoint and a public endpoint.
attrMetaData
Required
public IResolvable getAttrMetaData();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute MetaData: The metadata of the cluster.
attrName
Required
public IResolvable getAttrName();
- Type: com.aliyun.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 IResolvable getAttrNetworkMode();
- Type: com.aliyun.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 IResolvable getAttrNextVersion();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute NextVersion: The Kubernetes version to which the cluster can be upgraded.
attrParameters
Required
public IResolvable getAttrParameters();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute Parameters: A collection of cluster ROS parameters.
attrPrivateZone
Required
public IResolvable getAttrPrivateZone();
- Type: com.aliyun.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 IResolvable getAttrProfile();
- Type: com.aliyun.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 IResolvable getAttrRegionId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute RegionId: The ID of the region where the cluster is deployed.
attrResourceGroupId
Required
public IResolvable getAttrResourceGroupId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute ResourceGroupId: The ID of the resource group to which the cluster belongs.
attrSecurityGroupId
Required
public IResolvable getAttrSecurityGroupId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute SecurityGroupId: The ID of the security group to which the instances of the cluster belong.
attrSize
Required
public IResolvable getAttrSize();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute Size: The number of nodes in the cluster.
Master nodes and worker nodes are included.
attrState
Required
public IResolvable getAttrState();
- Type: com.aliyun.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 IResolvable getAttrSubnetCidr();
- Type: com.aliyun.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 IResolvable getAttrTags();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute Tags: The labels of the cluster.
attrUpdated
Required
public IResolvable getAttrUpdated();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute Updated: The time when the cluster was updated.
attrVpcId
Required
public IResolvable getAttrVpcId();
- Type: com.aliyun.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 IResolvable getAttrVSwitchId();
- Type: com.aliyun.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 IResolvable getAttrWorkerRamRoleName();
- Type: com.aliyun.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 IResolvable getAttrZoneId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute ZoneId: The ID of the zone where the cluster is deployed.