sigs.k8s.io/cluster-api-provider-azure@v1.14.3/templates/flavors/machinepool-windows/machine-pool-deployment-windows.yaml (about) 1 --- 2 apiVersion: cluster.x-k8s.io/v1beta1 3 kind: MachinePool 4 metadata: 5 name: "${CLUSTER_NAME}-mp-win" 6 spec: 7 clusterName: "${CLUSTER_NAME}" 8 replicas: ${WORKER_MACHINE_COUNT:=2} 9 template: 10 spec: 11 clusterName: "${CLUSTER_NAME}" 12 version: "${KUBERNETES_VERSION}" 13 bootstrap: 14 configRef: 15 name: "${CLUSTER_NAME}-mp-win" 16 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 17 kind: KubeadmConfig 18 infrastructureRef: 19 name: "${CLUSTER_NAME}-mp-win" 20 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 21 kind: AzureMachinePool 22 --- 23 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 24 kind: AzureMachinePool 25 metadata: 26 name: "${CLUSTER_NAME}-mp-win" 27 annotations: 28 runtime: containerd 29 windowsServerVersion: ${WINDOWS_SERVER_VERSION:=""} 30 spec: 31 location: ${AZURE_LOCATION} 32 template: 33 vmSize: ${AZURE_NODE_MACHINE_TYPE} 34 osDisk: 35 osType: "Windows" 36 diskSizeGB: 128 37 managedDisk: 38 storageAccountType: "Premium_LRS" 39 sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""} 40 --- 41 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 42 kind: KubeadmConfig 43 metadata: 44 name: "${CLUSTER_NAME}-mp-win" 45 spec: 46 users: 47 - name: capi 48 groups: Administrators 49 sshAuthorizedKeys: 50 - ${AZURE_SSH_PUBLIC_KEY:=""} 51 preKubeadmCommands: 52 - powershell c:/create-external-network.ps1 53 postKubeadmCommands: 54 - nssm set kubelet start SERVICE_AUTO_START 55 - powershell C:/defender-exclude-calico.ps1 56 joinConfiguration: 57 nodeRegistration: 58 name: '{{ ds.meta_data["local_hostname"] }}' 59 criSocket: npipe:////./pipe/containerd-containerd 60 kubeletExtraArgs: 61 cloud-provider: external 62 pod-infra-container-image: "mcr.microsoft.com/oss/kubernetes/pause:3.9" 63 files: 64 - contentFrom: 65 secret: 66 name: ${CLUSTER_NAME}-mp-win-azure-json 67 key: worker-node-azure.json 68 owner: root:root 69 path: c:/k/azure.json 70 permissions: "0644" 71 - path: C:/defender-exclude-calico.ps1 72 permissions: "0744" 73 content: |- 74 Add-MpPreference -ExclusionProcess C:/opt/cni/bin/calico.exe