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
from ros_cdk_cs import datasource
datasource.KubernetesCluster(
scope: Construct,
id: str,
cluster_id: typing.Union[str, IResolvable] = None,
refresh_options: typing.Union[str, IResolvable] = None,
enable_resource_property_constraint: bool = None
)
Name | Type | Description |
---|---|---|
scope |
ros_cdk_core.Construct |
No description. |
id |
str |
No description. |
cluster_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property clusterId: Cluster instance ID. |
refresh_options |
typing.Union[str, ros_cdk_core.IResolvable] |
Property refreshOptions: The refresh strategy for the datasource resource when the stack is updated. |
enable_resource_property_constraint |
bool |
No description. |
scope
Required
- Type: ros_cdk_core.Construct
id
Required
- Type: str
cluster_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property clusterId: Cluster instance ID.
refresh_options
Optional
- Type: typing.Union[str, 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.
enable_resource_property_constraint
Optional
- Type: bool
Methods
Name | Description |
---|---|
to_string |
Returns a string representation of this construct. |
synthesize |
Allows this construct to emit artifacts into the cloud assembly during synthesis. |
add_condition |
No description. |
add_count |
No description. |
add_dependency |
No description. |
add_resource_desc |
No description. |
apply_removal_policy |
No description. |
get_att |
No description. |
set_metadata |
No description. |
to_string
def to_string() -> str
Returns a string representation of this construct.
synthesize
def synthesize(
session: ISynthesisSession
) -> None
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: ros_cdk_core.ISynthesisSession
The synthesis session.
add_condition
def add_condition(
condition: RosCondition
) -> None
- Type: ros_cdk_core.RosCondition
add_count
def add_count(
count: typing.Union[typing.Union[int, float], IResolvable]
) -> None
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
add_dependency
def add_dependency(
resource: Resource
) -> None
- Type: ros_cdk_core.Resource
add_resource_desc
def add_resource_desc(
desc: str
) -> None
- Type: str
apply_removal_policy
def apply_removal_policy(
policy: RemovalPolicy
) -> None
- Type: ros_cdk_core.RemovalPolicy
get_att
def get_att(
name: str
) -> IResolvable
- Type: str
set_metadata
def set_metadata(
key: str,
value: typing.Any
) -> None
- Type: str
- Type: typing.Any
Static Functions
Name | Description |
---|---|
is_construct |
Return whether the given object is a Construct. |
is_construct
from ros_cdk_cs import datasource
datasource.KubernetesCluster.is_construct(
x: typing.Any
)
Return whether the given object is a Construct.
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node |
ros_cdk_core.ConstructNode |
The construct tree node associated with this construct. |
ref |
str |
No description. |
stack |
ros_cdk_core.Stack |
The stack in which this resource is defined. |
resource |
ros_cdk_core.RosResource |
No description. |
attr_cluster_id |
ros_cdk_core.IResolvable |
Attribute ClusterId: Cluster instance ID. |
attr_cluster_spec |
ros_cdk_core.IResolvable |
Attribute ClusterSpec: The type of the managed Kubernetes cluster. |
attr_cluster_type |
ros_cdk_core.IResolvable |
Attribute ClusterType: The type of the cluster. |
attr_created |
ros_cdk_core.IResolvable |
Attribute Created: The time when the cluster was created. |
attr_current_version |
ros_cdk_core.IResolvable |
Attribute CurrentVersion: The current Kubernetes version of the cluster. |
attr_deletion_protection |
ros_cdk_core.IResolvable |
Attribute DeletionProtection: Indicates whether deletion protection is enabled. |
attr_docker_version |
ros_cdk_core.IResolvable |
Attribute DockerVersion: The Docker version that is used by the cluster. |
attr_external_loadbalancer_id |
ros_cdk_core.IResolvable |
Attribute ExternalLoadbalancerId: The ID of the Server Load Balancer (SLB) instance that is used for the Ingress of the cluster. |
attr_init_version |
ros_cdk_core.IResolvable |
Attribute InitVersion: The Kubernetes version that is initially used by the cluster. |
attr_maintenance_window |
ros_cdk_core.IResolvable |
Attribute MaintenanceWindow: The maintenance window of the cluster. |
attr_master_url |
ros_cdk_core.IResolvable |
Attribute MasterUrl: The address of the cluster. |
attr_meta_data |
ros_cdk_core.IResolvable |
Attribute MetaData: The metadata of the cluster. |
attr_name |
ros_cdk_core.IResolvable |
Attribute Name: The name of the cluster. |
attr_network_mode |
ros_cdk_core.IResolvable |
Attribute NetworkMode: The network mode of the cluster. |
attr_next_version |
ros_cdk_core.IResolvable |
Attribute NextVersion: The Kubernetes version to which the cluster can be upgraded. |
attr_parameters |
ros_cdk_core.IResolvable |
Attribute Parameters: A collection of cluster ROS parameters. |
attr_private_zone |
ros_cdk_core.IResolvable |
Attribute PrivateZone: Indicates whether Alibaba Cloud DNS PrivateZone is enabled. |
attr_profile |
ros_cdk_core.IResolvable |
Attribute Profile: Indicates the scenario in which the cluster is used. |
attr_region_id |
ros_cdk_core.IResolvable |
Attribute RegionId: The ID of the region where the cluster is deployed. |
attr_resource_group_id |
ros_cdk_core.IResolvable |
Attribute ResourceGroupId: The ID of the resource group to which the cluster belongs. |
attr_security_group_id |
ros_cdk_core.IResolvable |
Attribute SecurityGroupId: The ID of the security group to which the instances of the cluster belong. |
attr_size |
ros_cdk_core.IResolvable |
Attribute Size: The number of nodes in the cluster. |
attr_state |
ros_cdk_core.IResolvable |
Attribute State: The state of the cluster. |
attr_subnet_cidr |
ros_cdk_core.IResolvable |
Attribute SubnetCidr: The pod CIDR block. |
attr_tags |
ros_cdk_core.IResolvable |
Attribute Tags: The labels of the cluster. |
attr_updated |
ros_cdk_core.IResolvable |
Attribute Updated: The time when the cluster was updated. |
attr_vpc_id |
ros_cdk_core.IResolvable |
Attribute VpcId: The ID of the VPC where the cluster is deployed. |
attr_v_switch_id |
ros_cdk_core.IResolvable |
Attribute VSwitchId: The IDs of the vSwitches. |
attr_worker_ram_role_name |
ros_cdk_core.IResolvable |
Attribute WorkerRamRoleName: The name of the worker RAM role. |
attr_zone_id |
ros_cdk_core.IResolvable |
Attribute ZoneId: The ID of the zone where the cluster is deployed. |
node
Required
node: ConstructNode
- Type: ros_cdk_core.ConstructNode
The construct tree node associated with this construct.
ref
Required
ref: str
- Type: str
stack
Required
stack: Stack
- Type: ros_cdk_core.Stack
The stack in which this resource is defined.
resource
Optional
resource: RosResource
- Type: ros_cdk_core.RosResource
attr_cluster_id
Required
attr_cluster_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute ClusterId: Cluster instance ID.
attr_cluster_spec
Required
attr_cluster_spec: IResolvable
- Type: 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.
attr_cluster_type
Required
attr_cluster_type: IResolvable
- Type: 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
attr_created
Required
attr_created: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute Created: The time when the cluster was created.
attr_current_version
Required
attr_current_version: IResolvable
- Type: 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.
attr_deletion_protection
Required
attr_deletion_protection: IResolvable
- Type: 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.
attr_docker_version
Required
attr_docker_version: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute DockerVersion: The Docker version that is used by the cluster.
attr_external_loadbalancer_id
Required
attr_external_loadbalancer_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute ExternalLoadbalancerId: The ID of the Server Load Balancer (SLB) instance that is used for the Ingress of the cluster.
attr_init_version
Required
attr_init_version: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute InitVersion: The Kubernetes version that is initially used by the cluster.
attr_maintenance_window
Required
attr_maintenance_window: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute MaintenanceWindow: The maintenance window of the cluster.
This feature is available in only professional managed Kubernetes clusters.
attr_master_url
Required
attr_master_url: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute MasterUrl: The address of the cluster.
It includes an internal endpoint and a public endpoint.
attr_meta_data
Required
attr_meta_data: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute MetaData: The metadata of the cluster.
attr_name
Required
attr_name: IResolvable
- Type: 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 (-).
attr_network_mode
Required
attr_network_mode: IResolvable
- Type: 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.
attr_next_version
Required
attr_next_version: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute NextVersion: The Kubernetes version to which the cluster can be upgraded.
attr_parameters
Required
attr_parameters: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute Parameters: A collection of cluster ROS parameters.
attr_private_zone
Required
attr_private_zone: IResolvable
- Type: 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.
attr_profile
Required
attr_profile: IResolvable
- Type: 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.
attr_region_id
Required
attr_region_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute RegionId: The ID of the region where the cluster is deployed.
attr_resource_group_id
Required
attr_resource_group_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute ResourceGroupId: The ID of the resource group to which the cluster belongs.
attr_security_group_id
Required
attr_security_group_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute SecurityGroupId: The ID of the security group to which the instances of the cluster belong.
attr_size
Required
attr_size: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute Size: The number of nodes in the cluster.
Master nodes and worker nodes are included.
attr_state
Required
attr_state: IResolvable
- Type: 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.
attr_subnet_cidr
Required
attr_subnet_cidr: IResolvable
- Type: 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.
attr_tags
Required
attr_tags: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute Tags: The labels of the cluster.
attr_updated
Required
attr_updated: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute Updated: The time when the cluster was updated.
attr_vpc_id
Required
attr_vpc_id: IResolvable
- Type: 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.
attr_v_switch_id
Required
attr_v_switch_id: IResolvable
- Type: 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.
attr_worker_ram_role_name
Required
attr_worker_ram_role_name: IResolvable
- Type: 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.
attr_zone_id
Required
attr_zone_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute ZoneId: The ID of the zone where the cluster is deployed.