Skip to content

KubernetesCluster

  • Implements: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcs.datasource.IKubernetesCluster

This class encapsulates and extends the ROS resource type DATASOURCE::CS::KubernetesCluster.

Initializers

import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkcs/datasource"
datasource.NewKubernetesCluster(scope Construct, id *string, props KubernetesClusterProps, enableResourcePropertyConstraint *bool) KubernetesCluster
Name Type Description
scope github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.Construct No description.
id *string No description.
props KubernetesClusterProps No description.
enableResourcePropertyConstraint *bool No description.

scopeRequired

  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.Construct

idRequired

  • Type: *string

propsOptional


enableResourcePropertyConstraintOptional

  • Type: *bool

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.
FetchCondition No description.
FetchDependency No description.
FetchResourceDesc No description.
GetAtt No description.
SetMetadata No description.

ToString

func ToString() *string

Returns a string representation of this construct.

Synthesize

func Synthesize(session ISynthesisSession)

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: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.ISynthesisSession

The synthesis session.


AddCondition

func AddCondition(condition RosCondition)

conditionRequired

  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.RosCondition

AddCount

func AddCount(count interface{})

countRequired

  • Type: interface{}

AddDependency

func AddDependency(resource Resource)

resourceRequired

  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.Resource

AddResourceDesc

func AddResourceDesc(desc *string)

descRequired

  • Type: *string

ApplyRemovalPolicy

func ApplyRemovalPolicy(policy RemovalPolicy)

policyRequired

  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.RemovalPolicy

FetchCondition

func FetchCondition() RosCondition

FetchDependency

func FetchDependency() *[]*string

FetchResourceDesc

func FetchResourceDesc() *string

GetAtt

func GetAtt(name *string) IResolvable

nameRequired

  • Type: *string

SetMetadata

func SetMetadata(key *string, value interface{})

keyRequired

  • Type: *string

valueRequired

  • Type: interface{}

Static Functions

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

IsConstruct

import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkcs/datasource"
datasource.KubernetesCluster_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct.

xRequired

  • Type: interface{}

Properties

Name Type Description
Node github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.ConstructNode The construct tree node associated with this construct.
Env github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.IResourceEnvironment The environment this resource belongs to.
Ref *string No description.
Stack github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.Stack The stack in which this resource is defined.
Resource github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.RosResource No description.
AttrClusterId interface{} Attribute ClusterId: Cluster instance ID.
AttrClusterSpec interface{} Attribute ClusterSpec: The type of the managed Kubernetes cluster.
AttrClusterType interface{} Attribute ClusterType: The type of the cluster.
AttrCreated interface{} Attribute Created: The time when the cluster was created.
AttrCurrentVersion interface{} Attribute CurrentVersion: The current Kubernetes version of the cluster.
AttrDeletionProtection interface{} Attribute DeletionProtection: Indicates whether deletion protection is enabled.
AttrDockerVersion interface{} Attribute DockerVersion: The Docker version that is used by the cluster.
AttrExternalLoadbalancerId interface{} Attribute ExternalLoadbalancerId: The ID of the Server Load Balancer (SLB) instance that is used for the Ingress of the cluster.
AttrInitVersion interface{} Attribute InitVersion: The Kubernetes version that is initially used by the cluster.
AttrMaintenanceWindow interface{} Attribute MaintenanceWindow: The maintenance window of the cluster.
AttrMasterUrl interface{} Attribute MasterUrl: The address of the cluster.
AttrMetaData interface{} Attribute MetaData: The metadata of the cluster.
AttrName interface{} Attribute Name: The name of the cluster.
AttrNetworkMode interface{} Attribute NetworkMode: The network mode of the cluster.
AttrNextVersion interface{} Attribute NextVersion: The Kubernetes version to which the cluster can be upgraded.
AttrParameters interface{} Attribute Parameters: A collection of cluster ROS parameters.
AttrPrivateZone interface{} Attribute PrivateZone: Indicates whether Alibaba Cloud DNS PrivateZone is enabled.
AttrProfile interface{} Attribute Profile: Indicates the scenario in which the cluster is used.
AttrRegionId interface{} Attribute RegionId: The ID of the region where the cluster is deployed.
AttrResourceGroupId interface{} Attribute ResourceGroupId: The ID of the resource group to which the cluster belongs.
AttrSecurityGroupId interface{} Attribute SecurityGroupId: The ID of the security group to which the instances of the cluster belong.
AttrServiceCidr interface{} Attribute ServiceCidr: The cluster service cidr.
AttrSize interface{} Attribute Size: The number of nodes in the cluster.
AttrState interface{} Attribute State: The state of the cluster.
AttrSubnetCidr interface{} Attribute SubnetCidr: The pod CIDR block.
AttrTags interface{} Attribute Tags: The labels of the cluster.
AttrUpdated interface{} Attribute Updated: The time when the cluster was updated.
AttrVpcId interface{} Attribute VpcId: The ID of the VPC where the cluster is deployed.
AttrVSwitchId interface{} Attribute VSwitchId: The IDs of the vSwitches.
AttrVSwitchIds interface{} Attribute VSwitchIds: The list of cluster control plane VSwitch ID.
AttrWorkerRamRoleName interface{} Attribute WorkerRamRoleName: The name of the worker RAM role.
AttrZoneId interface{} Attribute ZoneId: The ID of the zone where the cluster is deployed.
Props KubernetesClusterProps No description.

NodeRequired

func Node() ConstructNode
  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.ConstructNode

The construct tree node associated with this construct.


EnvRequired

func Env() IResourceEnvironment
  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.IResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


RefRequired

func Ref() *string
  • Type: *string

StackRequired

func Stack() Stack
  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.Stack

The stack in which this resource is defined.


ResourceOptional

func Resource() RosResource
  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.RosResource

AttrClusterIdRequired

func AttrClusterId() interface{}
  • Type: interface{}

Attribute ClusterId: Cluster instance ID.


AttrClusterSpecRequired

func AttrClusterSpec() interface{}
  • Type: interface{}

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

func AttrClusterType() interface{}
  • Type: interface{}

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

func AttrCreated() interface{}
  • Type: interface{}

Attribute Created: The time when the cluster was created.


AttrCurrentVersionRequired

func AttrCurrentVersion() interface{}
  • Type: interface{}

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

func AttrDeletionProtection() interface{}
  • Type: interface{}

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

func AttrDockerVersion() interface{}
  • Type: interface{}

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


AttrExternalLoadbalancerIdRequired

func AttrExternalLoadbalancerId() interface{}
  • Type: interface{}

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


AttrInitVersionRequired

func AttrInitVersion() interface{}
  • Type: interface{}

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


AttrMaintenanceWindowRequired

func AttrMaintenanceWindow() interface{}
  • Type: interface{}

Attribute MaintenanceWindow: The maintenance window of the cluster.

This feature is available in only professional managed Kubernetes clusters.


AttrMasterUrlRequired

func AttrMasterUrl() interface{}
  • Type: interface{}

Attribute MasterUrl: The address of the cluster.

It includes an internal endpoint and a public endpoint.


AttrMetaDataRequired

func AttrMetaData() interface{}
  • Type: interface{}

Attribute MetaData: The metadata of the cluster.


AttrNameRequired

func AttrName() interface{}
  • Type: interface{}

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

func AttrNetworkMode() interface{}
  • Type: interface{}

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

func AttrNextVersion() interface{}
  • Type: interface{}

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


AttrParametersRequired

func AttrParameters() interface{}
  • Type: interface{}

Attribute Parameters: A collection of cluster ROS parameters.


AttrPrivateZoneRequired

func AttrPrivateZone() interface{}
  • Type: interface{}

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

func AttrProfile() interface{}
  • Type: interface{}

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

func AttrRegionId() interface{}
  • Type: interface{}

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


AttrResourceGroupIdRequired

func AttrResourceGroupId() interface{}
  • Type: interface{}

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


AttrSecurityGroupIdRequired

func AttrSecurityGroupId() interface{}
  • Type: interface{}

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


AttrServiceCidrRequired

func AttrServiceCidr() interface{}
  • Type: interface{}

Attribute ServiceCidr: The cluster service cidr.


AttrSizeRequired

func AttrSize() interface{}
  • Type: interface{}

Attribute Size: The number of nodes in the cluster.

Master nodes and worker nodes are included.


AttrStateRequired

func AttrState() interface{}
  • Type: interface{}

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

func AttrSubnetCidr() interface{}
  • Type: interface{}

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

func AttrTags() interface{}
  • Type: interface{}

Attribute Tags: The labels of the cluster.


AttrUpdatedRequired

func AttrUpdated() interface{}
  • Type: interface{}

Attribute Updated: The time when the cluster was updated.


AttrVpcIdRequired

func AttrVpcId() interface{}
  • Type: interface{}

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

This parameter is required when you create an ACK cluster.


AttrVSwitchIdRequired

func AttrVSwitchId() interface{}
  • Type: interface{}

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.


AttrVSwitchIdsRequired

func AttrVSwitchIds() interface{}
  • Type: interface{}

Attribute VSwitchIds: The list of cluster control plane VSwitch ID.


AttrWorkerRamRoleNameRequired

func AttrWorkerRamRoleName() interface{}
  • Type: interface{}

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

func AttrZoneId() interface{}
  • Type: interface{}

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


PropsRequired

func Props() KubernetesClusterProps