Azure CAPI Override Reference
This page provides examples and references for overriding Cluster API (CAPI) properties on Azure clusters using Cluster API Provider Azure (CAPZ).
Azure IaaS
Self-managed Azure IaaS clusters use the CAPZ self-managed path. Cluster-level overrides target the AzureCluster
resource, and pool-level overrides target the AzureMachineTemplate resource.
| Level | CAPI Kind | API References |
|---|---|---|
| All | - | CAPZ Book - API Reference *Use with caution as this reference guide is not semantically versioned. |
| Cluster | AzureCluster | v1.18.0 AzureCluster API types |
| Pool | AzureMachineTemplate | v1.18.0 AzureMachineTemplate API types |
Examples
These examples demonstrate how to override CAPI properties using YAML directly targeting the underlying CAPZ self-managed resources.
Cluster-Level
azureCluster:
spec:
additionalTags:
env: day0
owner: Anu
Pool-Level
AzureMachineTemplate has an extra level of nesting. The spec wraps a template, which contains another spec field
that holds the actual machine configuration. All pool-level Azure IaaS overrides use this structure.
azureMachineTemplate:
spec:
template:
spec:
vmSize: Standard_D4s_v3
azureMachineTemplate:
spec:
template:
spec:
osDisk:
diskSizeGB: 128
Unsupported First-Class Properties
The following properties are not exposed as first-class properties in the supported interfaces for Palette but can be configured using override. To learn more about the difference between first-class properties and override properties, refer to the First-Class Support vs. Override section.
| CAPZ Resource Type | Properties |
|---|---|
AzureCluster | additionalTags, bastionSpec, cloudProviderConfigOverrides, controlPlaneEnabled, controlPlaneEndpoint, extendedLocation, failureDomains |
AzureMachineTemplate | additionalCapabilities, additionalCapabilities.ultraSSDEnabled, additionalTags, allocatePublicIP, dataDisks, diagnostics, enableIPForwarding, failureDomain, providerID, securityProfile.securityType, securityProfile.uefiSettings, systemAssignedIdentityRole, userAssignedIdentities |
Azure AKS
Azure AKS clusters use the CAPZ managed path. Cluster-level overrides target the AzureManagedControlPlane resource,
and pool-level overrides target the AzureManagedMachinePool resource.
| Level | CAPI Kind | API References |
|---|---|---|
| All | - | CAPZ Book - API Reference *Use with caution as this reference guide is not semantically versioned. |
| Cluster | AzureManagedControlPlane | v1.18.0 AzureManagedControlPlane API types |
| Pool | AzureManagedMachinePool | v1.18.0 AzureManagedMachinePool API types |
Examples
These examples demonstrate how to override CAPI properties using YAML directly targeting the underlying CAPZ resources.
Cluster-Level
azureManagedControlPlane:
spec:
autoUpgradeProfile:
upgradeChannel: patch
oidcIssuerProfile:
enabled: true
securityProfile:
workloadIdentity:
enabled: true
azureManagedControlPlane:
spec:
dnsPrefix: aksdemo-updated
Pool-Level
azureManagedMachinePool:
spec:
maxPods: 30
kubeletDiskType: OS
enableNodePublicIP: false
azureManagedMachinePool:
spec:
sku: Standard_D8s_v5
osDiskSizeGB: 256
nodeLabels:
env: test
updated: "true"
Whenever you use asoManagedClustersAgentPoolPatches on azureManagedMachinePool, you must include an entry that sets
the osSKU field alongside any other patch entries.
Set osSKU to the value that matches the OS you selected for the node pool: AzureLinux, Ubuntu, or Windows2022.
azureManagedMachinePool:
spec:
asoManagedClustersAgentPoolPatches:
- '{"spec":{"upgradeSettings":{"maxSurge":"1"}}}'
- '{"spec":{"osSKU":"AzureLinux"}}' # Other values include Ubuntu and Windows2022
The OS SKU is also exposed as a first-class OS SKU field on the node pool configuration in Palette, which is the recommended way to set it. Refer to Create and Manage Azure AKS Cluster for details.
The OS SKU is immutable after the node pool is created, overriding it on an existing node pool has no effect.
Encryption
Host Encryption
Host encryption encrypts the OS and temporary disks on the underlying VM host using platform-managed keys. You can
configure it at the pool level using the enableEncryptionAtHost field on AzureManagedMachinePool.
enableEncryptionAtHost is immutable and must be set when the node pool is first created. It cannot be enabled or
disabled on an existing pool.
azureManagedMachinePool:
spec:
enableEncryptionAtHost: true
Disk Encryption Sets
CAPZ v1.18.0 does not expose a first-class
Disk Encryption Set (DES) field for AKS node
pools. The supported workaround is to use the asoManagedClusterPatches field on AzureManagedControlPlane, which
applies a JSON merge patch directly to the underlying Azure Service Operator (ASO) ManagedCluster resource.
The asoManagedClusterPatches field is intended for advanced use only. To avoid misconfiguration that conflicts with
CAPZ's normal operation, test changes in a non-production environment before applying them to a production cluster.
azureManagedControlPlane:
spec:
asoManagedClusterPatches:
- '{"spec": {"diskEncryptionSetReference":
"/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.Compute/diskEncryptionSets/<disk-encryption-set-name>"}}'
Known Immutable Fields
The following fields become immutable after an AKS cluster is created. Attempting to disable them via override after they have been enabled results in an error. You must revert the override change to clear the error and allow the cluster to reconcile.
| Field | CAPI Kind | Notes |
|---|---|---|
aadProfile | AzureManagedControlPlane | Cannot be disabled once enabled. |
oidcIssuerProfile | AzureManagedControlPlane | Cannot be disabled once enabled. |
enableEncryptionAtHost | AzureManagedMachinePool | Must be set at node pool creation. Cannot be changed afterwards. |
Unsupported First-Class Properties
The following properties are not exposed as first-class properties in the supported interfaces for Palette but can be configured using override. To learn more about the difference between first-class properties and override properties, refer to the First-Class Support vs. Override section.
| CAPZ Resource Type | Properties |
|---|---|
AzureManagedControlPlane | controlPlaneEndpoint, fleetsMember, fqdnSubdomain, securityProfile (partial support) |
AzureManagedMachinePool | additionalTags, enableNodePublicIP, enableUltraSSD, name, nodeLabels, nodePublicIPPrefixID, osDiskType, scaleDownMode, scaleSetPriority, spotMaxPrice, taints |