OpenMCF logoOpenMCF

Loading...

AliCloud KubernetesNodePool

Deploys a worker node pool in an Alibaba Cloud ACK Managed Kubernetes cluster with configurable instance types, ESSD disk configuration, auto-scaling, managed lifecycle (auto-repair, auto-upgrade), spot instance support, and Kubernetes scheduling properties (labels, taints).

What Gets Created

When you deploy an AliCloudKubernetesNodePool resource, OpenMCF provisions:

  • ACK Node Pool — an alicloud_cs_kubernetes_node_pool resource containing a group of ECS worker nodes with shared instance configuration, scaling policy, and Kubernetes properties
  • ECS Instances — worker nodes provisioned within the pool based on desiredSize or auto-scaler decisions
  • Auto Scaling Group — backing scaling group for the node pool, used for auto-scaling operations

Prerequisites

  • Alibaba Cloud credentials configured via environment variables or OpenMCF provider config
  • An existing ACK cluster (AliCloudKubernetesCluster) to attach the node pool to
  • At least one VSwitch in the same VPC as the parent cluster
  • An SSH key pair or password for node access

Quick Start

Create a file node-pool.yaml:

apiVersion: ali-cloud.openmcf.org/v1
kind: AliCloudKubernetesNodePool
metadata:
  name: my-pool
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    pulumi.openmcf.org/stack.name: dev.AliCloudKubernetesNodePool.my-pool
spec:
  region: cn-hangzhou
  clusterId:
    value: c-abc123
  name: my-pool
  vswitchIds:
    - value: vsw-aaa111
    - value: vsw-bbb222
  instanceTypes:
    - ecs.g7.xlarge
  desiredSize: 2
  keyName: my-keypair

Deploy:

openmcf apply -f node-pool.yaml

This creates a two-node pool with AliyunLinux3, 120 GiB cloud_essd system disks, across two Availability Zones.

Configuration Reference

Required Fields

FieldTypeDescriptionValidation
regionstringAlibaba Cloud region. Must match the parent cluster's region.Required; non-empty
clusterIdStringValueOrRefACK cluster ID that this node pool belongs to.Required
clusterId.valuestringDirect cluster ID value.—
clusterId.valueFromobjectForeign key reference to an AliCloudKubernetesCluster resource.Default kind: AliCloudKubernetesCluster, field: status.outputs.cluster_id
namestringNode pool name.Required; 1–63 characters
vswitchIdsStringValueOrRef[]VSwitch IDs for worker node placement. Use distinct AZs for HA.1–5 items required
instanceTypesstring[]ECS instance types. Multiple types improve availability.At least 1 required

Optional Fields

FieldTypeDefaultDescription
desiredSizeint—Number of nodes. For auto-scaling pools, sets the initial count. Range: 0–1000.
imageTypestringAliyunLinux3OS image type. Values: AliyunLinux, AliyunLinux3, AliyunLinux3Arm64, Ubuntu, CentOS, Windows, ContainerOS, Custom, and others.
systemDisk.categorystringcloud_essdSystem disk type: cloud_efficiency, cloud_ssd, cloud_essd, cloud_auto.
systemDisk.sizeint120System disk size in GiB. Range: 40–500.
systemDisk.performanceLevelstring—ESSD performance level: PL0, PL1, PL2, PL3. Only for cloud_essd.
systemDisk.encryptedboolfalseEncrypt the system disk.
systemDisk.kmsKeyIdstring—KMS key ID for disk encryption.
dataDisksDataDisk[][]Additional data disks per node. Each requires size (40–32767 GiB).
securityGroupIdsStringValueOrRef[]Cluster defaultSecurity groups for nodes. Immutable after creation. Can reference AliCloudSecurityGroup.
internetMaxBandwidthOutint0Max outbound bandwidth in Mbps. >0 allocates a public IP. Range: 0–100.
internetChargeTypestringPayByTrafficPublic internet billing: PayByBandwidth or PayByTraffic.
keyNamestring—SSH key pair name. Mutually exclusive with password.
passwordstring—SSH password. Mutually exclusive with keyName. Sensitive.
labelsmap<string, string>{}Kubernetes labels for pod scheduling (nodeSelector, affinity).
taintsTaint[][]Kubernetes taints. Each has key, value, effect (NoSchedule/PreferNoSchedule/NoExecute).
cpuPolicystringnoneCPU management: none (CFS) or static (pin exclusive containers to CPUs).
runtimeNamestringProvider defaultContainer runtime: containerd, Sandboxed-Container.runv.
runtimeVersionstringLatestContainer runtime version.
unschedulableboolfalseMark new nodes as unschedulable until manually uncordoned.
userDatastring—Base64-encoded boot script. Max 16 KB before encoding.
installCloudMonitorbooltrueInstall Alibaba Cloud CloudMonitor agent.
scalingConfigobject—Auto-scaling configuration.
scalingConfig.enablebooltrueEnable auto-scaling.
scalingConfig.minSizeint—Minimum node count. Range: 0–1000.
scalingConfig.maxSizeint—Maximum node count. Range: 0–2000.
scalingConfig.typestringcpuInstance classification: cpu, gpu, gpushare, spot.
multiAzPolicystring—Multi-AZ distribution: PRIORITY, COST_OPTIMIZED, BALANCE.
managementobject—Managed lifecycle settings.
management.enablebooltrueEnable managed node pool features.
management.autoRepairbool—Auto-replace unhealthy nodes.
management.autoUpgradebool—Auto-upgrade kubelet on cluster version change.
management.maxUnavailableint1Max nodes unavailable during managed operations. Range: 0–1000.
spotStrategystringNoSpotSpot strategy: NoSpot, SpotWithPriceLimit, SpotAsPriceGo.
spotPriceLimitsSpotPriceLimit[][]Per-type price caps. Each has instanceType and priceLimit (CNY/hour).
instanceChargeTypestringPostPaidBilling: PostPaid (pay-as-you-go) or PrePaid (subscription).
periodint—Subscription months (1, 2, 3, 6, 12). Required for PrePaid.
autoRenewbool—Auto-renew subscription.
autoRenewPeriodint—Auto-renewal period in months (1, 2, 3, 6, 12).
tagsmap<string, string>{}Tags applied to ECS instances.
resourceGroupIdstringDefault groupResource group for organizational grouping.
ramRoleNamestringCluster defaultRAM role for worker nodes. Immutable after creation.

Examples

Development Pool

A minimal fixed-size pool for development workloads.

apiVersion: ali-cloud.openmcf.org/v1
kind: AliCloudKubernetesNodePool
metadata:
  name: dev-pool
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    pulumi.openmcf.org/stack.name: dev.AliCloudKubernetesNodePool.dev-pool
spec:
  region: cn-hangzhou
  clusterId:
    value: c-abc123
  name: dev-pool
  vswitchIds:
    - value: vsw-aaa111
    - value: vsw-bbb222
  instanceTypes:
    - ecs.g7.xlarge
  desiredSize: 2
  keyName: dev-keypair

Production Auto-Scaling Pool

A production pool with auto-scaling, managed lifecycle, and multiple instance types.

apiVersion: ali-cloud.openmcf.org/v1
kind: AliCloudKubernetesNodePool
metadata:
  name: prod-compute
  org: acme-corp
  env: production
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: acme-corp
    pulumi.openmcf.org/project: infrastructure
    pulumi.openmcf.org/stack.name: production.AliCloudKubernetesNodePool.prod-compute
spec:
  region: cn-hangzhou
  clusterId:
    valueFrom:
      kind: AliCloudKubernetesCluster
      name: prod-cluster
      field: status.outputs.cluster_id
  name: prod-compute
  vswitchIds:
    - valueFrom:
        kind: AliCloudVswitch
        name: node-vsw-a
        field: status.outputs.vswitch_id
    - valueFrom:
        kind: AliCloudVswitch
        name: node-vsw-b
        field: status.outputs.vswitch_id
  instanceTypes:
    - ecs.c7.xlarge
    - ecs.c7.2xlarge
  desiredSize: 5
  keyName: prod-keypair
  labels:
    workload-type: compute
    team: platform
  scalingConfig:
    enable: true
    minSize: 3
    maxSize: 30
  multiAzPolicy: BALANCE
  management:
    enable: true
    autoRepair: true
    autoUpgrade: true
    maxUnavailable: 1
  systemDisk:
    category: cloud_essd
    size: 200
    performanceLevel: PL1
    encrypted: true
  tags:
    cost-center: infra-001

Spot Batch Processing Pool

A cost-optimized pool using spot instances with taints for batch workload isolation.

apiVersion: ali-cloud.openmcf.org/v1
kind: AliCloudKubernetesNodePool
metadata:
  name: batch-spot
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    pulumi.openmcf.org/stack.name: prod.AliCloudKubernetesNodePool.batch-spot
spec:
  region: cn-hangzhou
  clusterId:
    value: c-abc123
  name: batch-spot
  vswitchIds:
    - value: vsw-aaa111
    - value: vsw-bbb222
  instanceTypes:
    - ecs.g7.xlarge
    - ecs.g7.2xlarge
    - ecs.c7.xlarge
  desiredSize: 0
  keyName: my-keypair
  spotStrategy: SpotWithPriceLimit
  spotPriceLimits:
    - instanceType: ecs.g7.xlarge
      priceLimit: "0.98"
    - instanceType: ecs.g7.2xlarge
      priceLimit: "1.96"
    - instanceType: ecs.c7.xlarge
      priceLimit: "0.85"
  taints:
    - key: workload-type
      value: batch
      effect: NoSchedule
  labels:
    workload-type: batch
  scalingConfig:
    enable: true
    minSize: 0
    maxSize: 50
    type: spot
  multiAzPolicy: COST_OPTIMIZED
  systemDisk:
    size: 200
  dataDisks:
    - category: cloud_essd
      size: 500
      name: batch-data

Stack Outputs

After deployment, the following outputs are available in status.outputs:

OutputTypeDescription
node_pool_idstringACK node pool ID assigned by Alibaba Cloud
scaling_group_idstringAuto Scaling group ID associated with this node pool

Related Components

  • AliCloudKubernetesCluster — the parent cluster that this node pool belongs to
  • AliCloudVswitch — provides VSwitches for worker node placement
  • AliCloudSecurityGroup — controls network access for worker nodes

Next article

AliCloud Log Project

AliCloud Log Project Deploys an Alibaba Cloud Simple Log Service (SLS) project with bundled log stores and full-text indexes. The component provisions the project, creates each specified log store, and enables full-text search indexing per store by default — ensuring logs are immediately queryable after ingestion. What Gets Created When you deploy an AliCloudLogProject resource, OpenMCF provisions: SLS Project — the regional container for log data, created with the specified name, description,...
Read next article
Presets
3 ready-to-deploy configurationsView presets →