ManagedKubernetes

class ManagedKubernetes : KotlinCustomResource

This resource will help you to manage a ManagedKubernetes Cluster in Alibaba Cloud Kubernetes Service.

NOTE: Available since v1.26.0. NOTE: It is recommended to create a cluster with zero worker nodes, and then use a node pool to manage the cluster nodes. NOTE: Kubernetes cluster only supports VPC network and it can access internet while creating kubernetes cluster. A Nat Gateway and configuring a SNAT for it can ensure one VPC network access internet. If there is no nat gateway in the VPC, you can set new_nat_gateway to "true" to create one automatically. NOTE: Creating kubernetes cluster need to install several packages and it will cost about 15 minutes. Please be patient. NOTE: From version 1.9.4, the provider supports to download kube config, client certificate, client key and cluster ca certificate after creating cluster successfully, and you can put them into the specified location, like '~/.kube/config'. NOTE: From version 1.20.0, the provider supports disabling internet load balancer for API Server by setting false to slb_internet_enabled. NOTE: If you want to manage Kubernetes, you can use Kubernetes Provider. NOTE: You need to activate several other products and confirm Authorization Policy used by Container Service before using this resource. Please refer to the Authorization management and Cluster management sections in the Document Center. NOTE: From version 1.72.0, Some parameters have been removed from resource,You can check them below and re-import the cluster if necessary. NOTE: From version 1.120.0, Support for cluster migration from Standard cluster to professional. NOTE: From version 1.177.0, runtime,enable_ssh,rds_instances,exclude_autoscaler_nodes,worker_number,worker_instance_types,password,key_name,kms_encrypted_password,kms_encryption_context,worker_instance_charge_type,worker_period,worker_period_unit,worker_auto_renew,worker_auto_renew_period,worker_disk_category,worker_disk_size,worker_data_disks,node_name_mode,node_port_range,os_type,platform,image_id,cpu_policy,user_data,taints,worker_disk_performance_level,worker_disk_snapshot_policy_id,install_cloud_monitor are deprecated. We Suggest you using resource alicloud.cs.NodePool to manage your cluster worker nodes. NOTE: From version 1.212.0, runtime,enable_ssh,rds_instances,exclude_autoscaler_nodes,worker_number,worker_instance_types,password,key_name,kms_encrypted_password,kms_encryption_context,worker_instance_charge_type,worker_period,worker_period_unit,worker_auto_renew,worker_auto_renew_period,worker_disk_category,worker_disk_size,worker_data_disks,node_name_mode,node_port_range,os_type,platform,image_id,cpu_policy,user_data,taints,worker_disk_performance_level,worker_disk_snapshot_policy_id,install_cloud_monitor,kube_config,availability_zone are removed. Please use resource alicloud.cs.NodePool to manage your cluster worker nodes.

Import

Kubernetes managed cluster can be imported using the id, e.g. Then complete the main.tf accords to the result of pulumi preview.

$ pulumi import alicloud:cs/managedKubernetes:ManagedKubernetes main cluster_id

Properties

Link copied to clipboard

The addon you want to install in cluster. See addons below. Only works for Create Operation, use resource cs_kubernetes_addon to manage addons if cluster is created.

Link copied to clipboard
val apiAudiences: Output<List<String>>?

A list of API audiences for Service Account Token Volume Projection. Set this to ["https://kubernetes&#46;default&#46;svc"] if you want to enable the Token Volume Projection feature (requires specifying service_account_issuer as well. From cluster version 1.22, Service Account Token Volume Projection will be enabled by default.

Link copied to clipboard

Audit log configuration. See audit_log_config below.

Link copied to clipboard

(Map, Deprecated from v1.248.0) Nested attribute containing certificate authority data for your cluster. Please use the attribute certificate_authority of new DataSource alicloud.cs.getClusterCredential to replace it.

Link copied to clipboard
val clientCert: Output<String>?

From version 1.248.0, new DataSource alicloud.cs.getClusterCredential is recommended to manage cluster's kubeconfig, you can also save the certificate_authority.client_cert attribute content of new DataSource alicloud.cs.getClusterCredential to an appropriate path(like ~/.kube/client-cert.pem) for replace it.

Link copied to clipboard
val clientKey: Output<String>?

From version 1.248.0, new DataSource alicloud.cs.getClusterCredential is recommended to manage cluster's kubeconfig, you can also save the certificate_authority.client_key attribute content of new DataSource alicloud.cs.getClusterCredential to an appropriate path(like ~/.kube/client-key.pem) for replace it.

Link copied to clipboard
val clusterCaCert: Output<String>?

From version 1.248.0, new DataSource alicloud.cs.getClusterCredential is recommended to manage cluster's kubeconfig, you can also save the certificate_authority.cluster_cert attribute content of new DataSource alicloud.cs.getClusterCredential to an appropriate path(like ~/.kube/cluster-ca-cert.pem) for replace it. Removed params

Link copied to clipboard
val clusterDomain: Output<String>?

Cluster local domain name, Default to cluster.local. A domain name consists of one or more sections separated by a decimal point (.), each of which is up to 63 characters long, and can be lowercase, numerals, and underscores (-), and must be lowercase or numerals at the beginning and end.

Link copied to clipboard
val clusterSpec: Output<String>

The cluster specifications of kubernetes cluster,which can be empty. Valid values:

Link copied to clipboard

Map of kubernetes cluster connection information.

Link copied to clipboard

List of target components for which logs need to be collected. Supports apiserver, kcm, scheduler, ccm and controlplane-events.

Link copied to clipboard

Control plane log project. If this field is not set, a log service project named k8s-log-{ClusterID} will be automatically created.

Link copied to clipboard

Control plane log retention duration (unit: day). Default 30. If control plane logs are to be collected, control_plane_log_ttl and control_plane_log_components must be specified.

Link copied to clipboard
val customSan: Output<String>?

Customize the certificate SAN, multiple IP or domain names are separated by English commas (,).

Link copied to clipboard

Delete options, only work for deleting resource. Make sure you have run pulumi up to make the configuration applied. See delete_options below.

Link copied to clipboard

Whether to enable cluster deletion protection.

Link copied to clipboard
val enableRrsa: Output<Boolean>?

Whether to enable cluster to support RRSA for kubernetes version 1.22.3+. Default to false. Once the RRSA function is turned on, it is not allowed to turn off. If your cluster has enabled this function, please manually modify your tf file and add the rrsa configuration to the file, learn more RAM Roles for Service Accounts.

Link copied to clipboard

The ID of the Key Management Service (KMS) key that is used to encrypt Kubernetes Secrets.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val ipStack: Output<String>

The IP address family that the cluster network uses. Valid values:

Link copied to clipboard

Enable to create advanced security group. default: false. Only works for Create Operation. See Advanced security group.

Link copied to clipboard

The cluster api server load balancer instance specification. For more information on how to select a LB instance specification, see SLB instance overview. Only works for Create Operation. The spec will not take effect because the charge of the load balancer has been changed to PayByCLCU.

Link copied to clipboard

The cluster maintenance window,effective only in the professional managed cluster. Managed node pool will use it. See maintenance_window below.

Link copied to clipboard
val name: Output<String>

The kubernetes cluster's name. It is unique in one Alicloud account.

Link copied to clipboard
val namePrefix: Output<String>?
Link copied to clipboard
val natGatewayId: Output<String>

The ID of nat gateway used to launch kubernetes cluster.

Link copied to clipboard
val newNatGateway: Output<Boolean>?

Whether to create a new nat gateway while creating kubernetes cluster. Default to true. Then openapi in Alibaba Cloud are not all on intranet, So turn this option on is a good choice. Only works for Create Operation.

Link copied to clipboard
val nodeCidrMask: Output<Int>?

The node cidr block to specific how many pods can run on single node. 24-28 is allowed. 24 means 2^(32-24)-1=255 and the node can run at most 255 pods. default: 24

Link copied to clipboard

The cluster automatic operation policy. See operation_policy below.

Link copied to clipboard
val podCidr: Output<String>?

Flannel Specific The CIDR block for the pod network when using Flannel.

Link copied to clipboard
val podVswitchIds: Output<List<String>>?

Terway Specific The vswitches for the pod network when using Terway. It is recommended that pod_vswitch_ids is not belong to vswitch_ids but must be in same availability zones. Only works for Create Operation.

Link copied to clipboard
val profile: Output<String>

The profile of cluster. Valid values:

Link copied to clipboard
val proxyMode: Output<String>?

Proxy mode is option of kube-proxy. options: iptables|ipvs. default: ipvs.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val resourceGroupId: Output<String>

The ID of the resource group,by default these cloud resources are automatically assigned to the default resource group.

Link copied to clipboard
val retainResources: Output<List<String>>?
Link copied to clipboard

(Optional, Available since v1.185.0) Nested attribute containing RRSA related data for your cluster.

Link copied to clipboard
val securityGroupId: Output<String>

The ID of the security group to which the ECS instances in the cluster belong. If it is not specified, a new Security group will be built.

Link copied to clipboard

The issuer of the Service Account token for Service Account Token Volume Projection, corresponds to the iss field in the token payload. Set this to "https://kubernetes.default.svc" to enable the Token Volume Projection feature (requires specifying api_audiences as well). From cluster version 1.22, Service Account Token Volume Projection will be enabled by default.

Link copied to clipboard
val serviceCidr: Output<String>?

The CIDR block for the service network. It cannot be duplicated with the VPC CIDR and CIDR used by Kubernetes cluster in VPC, cannot be modified after creation.

Link copied to clipboard

Configure whether to save certificate authority data for your cluster to attribute certificate_authority. For cluster security, recommended configuration as true. Will be removed with attribute certificate_authority removed. Network params

Link copied to clipboard
val slbId: Output<String>

The ID of APIServer load balancer.

Link copied to clipboard
val slbInternet: Output<String>

The public ip of load balancer.

Link copied to clipboard

Whether to create internet load balancer for API Server. Default to true. Only works for Create Operation.

Link copied to clipboard
val slbIntranet: Output<String>

The ID of private load balancer where the current cluster master node is located.

Link copied to clipboard
val tags: Output<Map<String, String>>?

Default nil, A map of tags assigned to the kubernetes cluster and work nodes. See tags below.

Link copied to clipboard
val timezone: Output<String>?

Cluster timezone, works for control plane and Worker nodes.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val userCa: Output<String>?

The path of customized CA cert, you can use this CA to sign client certs to connect your cluster.

Link copied to clipboard
val version: Output<String>

Desired Kubernetes version. If you do not specify a value, the latest available version at resource creation is used and no upgrades will occur except you set a higher version number. The value must be configured and increased to upgrade the version when desired. Downgrades are not supported by ACK. Do not specify if cluster auto upgrade is enabled, see cluster_auto_upgrade for more information.

Link copied to clipboard
val vpcId: Output<String>

The ID of VPC where the current cluster is located.

Link copied to clipboard
val vswitchIds: Output<List<String>>

The vSwitches of the control plane.

Link copied to clipboard

The RamRole Name attached to worker node.

Link copied to clipboard

The vSwitches used by control plane. Modification after creation will not take effect. Please use vswitch_ids to managed control plane vSwitches, which supports modifying control plane vSwitches.

Link copied to clipboard
val zoneIds: Output<List<String>>?

The IDs of the zone in which the cluster control plane is deployed. ACK automatically creates a VPC in the region and vSwitches in the specified zones. Only works for Create Operation. Do not specify this with vswitch_ids together.