OpenMCF logoOpenMCF

Loading...

Azure AKS Node Pool

Deploys a node pool into an existing Azure Kubernetes Service (AKS) cluster with configurable VM size, node count, autoscaling, availability zones, OS type, pool mode, and Spot VM pricing. The component creates a containerservice.AgentPool resource attached to the referenced parent cluster.

What Gets Created

When you deploy an AzureAksNodePool resource, OpenMCF provisions:

  • Agent Pool — a containerservice.AgentPool resource in the specified resource group and parent AKS cluster, configured with the chosen VM size, initial node count, OS type, and pool mode
  • Autoscaling — cluster autoscaler configuration on the pool when autoscaling is provided, with configurable minimum and maximum node counts
  • Availability Zone Spread — node distribution across the specified Azure availability zones for high availability
  • Spot VM Configuration — when spotEnabled is true, the pool uses Spot priority with a Delete eviction policy and pay-up-to-regular-price bidding

Prerequisites

  • Azure credentials configured via environment variables or OpenMCF provider config
  • An AKS cluster that the node pool will be added to (can reference an AzureAksCluster resource)
  • An Azure Resource Group where the parent cluster resides (can reference an AzureResourceGroup resource)

Quick Start

Create a file nodepool.yaml:

apiVersion: azure.openmcf.org/v1
kind: AzureAksNodePool
metadata:
  name: worker-pool
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    pulumi.openmcf.org/stack.name: dev.AzureAksNodePool.worker-pool
spec:
  clusterName: my-aks-cluster
  vmSize: Standard_D4s_v3
  initialNodeCount: 3
  resourceGroup: my-rg

Deploy:

openmcf apply -f nodepool.yaml

This creates a 3-node User-mode Linux node pool using Standard_D4s_v3 VMs with no autoscaling and no availability zone pinning.

Configuration Reference

Required Fields

FieldTypeDescriptionValidation
clusterNameStringValueOrRefName of the parent AKS cluster. Can reference an AzureAksCluster resource via valueFrom.Required
vmSizestringVM size (SKU) for nodes in this pool (e.g., Standard_D4s_v3). Determines the CPU and memory of each node.Required
initialNodeCountint32Number of nodes to create initially. When autoscaling is off, this is the fixed node count.Required, must be greater than 0
resourceGroupStringValueOrRefAzure Resource Group where the parent cluster resides. Can reference an AzureResourceGroup resource via valueFrom.Required

Optional Fields

FieldTypeDefaultDescription
autoscalingobjectnoneAutoscaling configuration. When set, cluster autoscaler is enabled for this pool. Contains minNodes (uint32, >= 0) and maxNodes (uint32, > 0).
availabilityZonesstring[][]Zones to spread nodes across for high availability. Valid values: "1", "2", "3". If specified, at least 2 zones are required.
osTypeenumLINUXOperating system type. Values: LINUX, WINDOWS. Windows pools require a cluster with Windows support.
modeenumUSERPool mode. SYSTEM pools host critical cluster components (CoreDNS, metrics-server), must be Linux, and cannot scale to zero. USER pools run application workloads, can be Linux or Windows, and can scale to zero.
spotEnabledboolfalseUse Spot (preemptible) VMs to reduce cost. Spot pools use a Delete eviction policy and pay up to the regular on-demand price. Cannot be used with System mode pools.

Examples

Basic User Pool

A simple application workload pool with a fixed node count:

apiVersion: azure.openmcf.org/v1
kind: AzureAksNodePool
metadata:
  name: app-pool
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    pulumi.openmcf.org/stack.name: dev.AzureAksNodePool.app-pool
spec:
  clusterName: my-aks-cluster
  vmSize: Standard_D2s_v3
  initialNodeCount: 2
  resourceGroup: dev-rg

Autoscaling Pool with Availability Zones

A production pool that scales between 2 and 10 nodes across three availability zones:

apiVersion: azure.openmcf.org/v1
kind: AzureAksNodePool
metadata:
  name: prod-pool
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    pulumi.openmcf.org/stack.name: prod.AzureAksNodePool.prod-pool
spec:
  clusterName: prod-cluster
  vmSize: Standard_D4s_v3
  initialNodeCount: 3
  resourceGroup: prod-rg
  autoscaling:
    minNodes: 2
    maxNodes: 10
  availabilityZones:
    - "1"
    - "2"
    - "3"

Spot Instance Pool for Batch Workloads

A cost-optimized pool using Spot VMs that can scale to zero when idle:

apiVersion: azure.openmcf.org/v1
kind: AzureAksNodePool
metadata:
  name: batch-pool
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    pulumi.openmcf.org/stack.name: prod.AzureAksNodePool.batch-pool
spec:
  clusterName: prod-cluster
  vmSize: Standard_D8s_v3
  initialNodeCount: 1
  resourceGroup: prod-rg
  spotEnabled: true
  autoscaling:
    minNodes: 0
    maxNodes: 20
  availabilityZones:
    - "1"
    - "2"
    - "3"

System Pool

A System-mode pool to host critical cluster components. System pools must be Linux and cannot scale to zero:

apiVersion: azure.openmcf.org/v1
kind: AzureAksNodePool
metadata:
  name: system-pool
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    pulumi.openmcf.org/stack.name: prod.AzureAksNodePool.system-pool
spec:
  clusterName: prod-cluster
  vmSize: Standard_D2s_v3
  initialNodeCount: 3
  resourceGroup: prod-rg
  mode: SYSTEM
  autoscaling:
    minNodes: 2
    maxNodes: 5
  availabilityZones:
    - "1"
    - "2"
    - "3"

Using Foreign Key References

Reference OpenMCF-managed resources instead of hardcoding names:

apiVersion: azure.openmcf.org/v1
kind: AzureAksNodePool
metadata:
  name: ref-pool
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    pulumi.openmcf.org/stack.name: prod.AzureAksNodePool.ref-pool
spec:
  clusterName:
    valueFrom:
      kind: AzureAksCluster
      name: prod-cluster
      field: metadata.name
  vmSize: Standard_D4s_v3
  initialNodeCount: 3
  resourceGroup:
    valueFrom:
      kind: AzureResourceGroup
      name: prod-rg
      field: status.outputs.resource_group_name
  autoscaling:
    minNodes: 2
    maxNodes: 8

Stack Outputs

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

OutputTypeDescription
nodePoolNamestringName of the node pool in AKS. Typically matches the resource metadata.name.
agentPoolResourceIdstringAzure Resource Manager ID of the created Agent Pool resource.
maxPodsPerNodeuint32Maximum number of pods that can run on each node of this pool. Determined by AKS based on network configuration and VM size.

Related Components

  • AzureAksCluster — provides the parent cluster that this node pool is added to
  • AzureResourceGroup — provides the resource group where the parent cluster resides
  • AzureVpc — provides the virtual network and subnets used by the AKS cluster
  • AzureSubnet — provides subnets that can be assigned to node pools for network isolation

Next article

Azure Application Gateway

Azure Application Gateway Deploys an Azure Application Gateway -- a Layer 7 (HTTP/HTTPS) load balancer and reverse proxy that provides SSL termination, host-based routing, cookie-based session affinity, custom health probes, and optional Web Application Firewall (WAF) protection. The component bundles the gateway with all structural sub-resources (frontend configuration, backend pools, listeners, routing rules, probes, and SSL certificates) into a single deployable unit. What Gets Created When...
Read next article
Presets
2 ready-to-deploy configurationsView presets →