Skip to content

Commit ff37e09

Browse files
authored
Merge pull request kubernetes-sigs#680 from CecileRobertMichon/vmtype-vmss
🐛 MachinePool template must have vmType vmss in control plane azure.json
2 parents b426c8f + f085b86 commit ff37e09

File tree

5 files changed

+41
-4
lines changed

5 files changed

+41
-4
lines changed

docs/topics/machinepools.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ Cluster API Provider Azure (CAPZ) has experimental support for `MachinePool` tho
3636
type `AzureMachinePool`. An `AzureMachinePool` corresponds to an [Azure Virtual Machine Scale Set](https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/overview),
3737
which provides the cloud provider specific resource for orchestrating a group of Virtual Machines.
3838

39+
⚠️ Cloud provider for Azure does not currently support clusters in mixed mode (both vmss and vmas node pools), so it is not supported to have both `AzureMachinePools` and `AzureMachines` in the same workload cluster.
40+
3941
### Using `clusterctl` to deploy
4042
To deploy a MachinePool / AzureMachinePool via `clusterctl config` there's a [flavor](https://cluster-api.sigs.k8s.io/clusterctl/commands/config-cluster.html#flavors)
4143
for that.
@@ -126,4 +128,4 @@ spec:
126128
cloud-provider: azure
127129
name: '{{ ds.meta_data["local_hostname"] }}'
128130
useExperimentalRetryJoin: true
129-
```
131+
```

templates/cluster-template-machinepool.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ spec:
7474
"resourceGroup": "${AZURE_RESOURCE_GROUP}",
7575
"securityGroupName": "${CLUSTER_NAME}-node-nsg",
7676
"location": "${AZURE_LOCATION}",
77-
"vmType": "standard",
77+
"vmType": "vmss",
7878
"vnetName": "${CLUSTER_NAME}-vnet",
7979
"vnetResourceGroup": "${CLUSTER_NAME}",
8080
"subnetName": "${CLUSTER_NAME}-node-subnet",
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
namespace: default
22
resources:
33
- ../base
4-
- machine-pool-deployment.yaml
4+
- machine-pool-deployment.yaml
5+
patchesStrategicMerge:
6+
- patches/control-plane-azure-file.yaml
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
apiVersion: controlplane.cluster.x-k8s.io/v1alpha3
3+
kind: KubeadmControlPlane
4+
metadata:
5+
name: ${CLUSTER_NAME}-control-plane
6+
namespace: default
7+
spec:
8+
kubeadmConfigSpec:
9+
files:
10+
- content: |
11+
{
12+
"cloud": "AzurePublicCloud",
13+
"tenantId": "${AZURE_TENANT_ID}",
14+
"subscriptionId": "${AZURE_SUBSCRIPTION_ID}",
15+
"aadClientId": "${AZURE_CLIENT_ID}",
16+
"aadClientSecret": "${AZURE_CLIENT_SECRET}",
17+
"resourceGroup": "${AZURE_RESOURCE_GROUP}",
18+
"securityGroupName": "${CLUSTER_NAME}-node-nsg",
19+
"location": "${AZURE_LOCATION}",
20+
"vmType": "vmss",
21+
"vnetName": "${CLUSTER_NAME}-vnet",
22+
"vnetResourceGroup": "${CLUSTER_NAME}",
23+
"subnetName": "${CLUSTER_NAME}-node-subnet",
24+
"routeTableName": "${CLUSTER_NAME}-node-routetable",
25+
"userAssignedID": "${CLUSTER_NAME}",
26+
"loadBalancerSku": "standard",
27+
"maximumLoadBalancerRuleCount": 250,
28+
"useManagedIdentityExtension": false,
29+
"useInstanceMetadata": true
30+
}
31+
owner: root:root
32+
path: /etc/kubernetes/azure.json
33+
permissions: "0644"

templates/test/cluster-template-prow-machine-pool.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ spec:
7777
"resourceGroup": "${AZURE_RESOURCE_GROUP}",
7878
"securityGroupName": "${CLUSTER_NAME}-node-nsg",
7979
"location": "${AZURE_LOCATION}",
80-
"vmType": "standard",
80+
"vmType": "vmss",
8181
"vnetName": "${CLUSTER_NAME}-vnet",
8282
"vnetResourceGroup": "${CLUSTER_NAME}",
8383
"subnetName": "${CLUSTER_NAME}-node-subnet",

0 commit comments

Comments
 (0)