sigs.k8s.io/cluster-api-provider-azure@v1.14.3/templates/cluster-template-windows.yaml (about) 1 apiVersion: cluster.x-k8s.io/v1beta1 2 kind: Cluster 3 metadata: 4 labels: 5 cni-windows: calico 6 csi-proxy: enabled 7 windows: enabled 8 name: ${CLUSTER_NAME} 9 namespace: default 10 spec: 11 clusterNetwork: 12 pods: 13 cidrBlocks: 14 - 192.168.0.0/16 15 controlPlaneRef: 16 apiVersion: controlplane.cluster.x-k8s.io/v1beta1 17 kind: KubeadmControlPlane 18 name: ${CLUSTER_NAME}-control-plane 19 infrastructureRef: 20 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 21 kind: AzureCluster 22 name: ${CLUSTER_NAME} 23 --- 24 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 25 kind: AzureCluster 26 metadata: 27 name: ${CLUSTER_NAME} 28 namespace: default 29 spec: 30 identityRef: 31 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 32 kind: AzureClusterIdentity 33 name: ${CLUSTER_IDENTITY_NAME} 34 location: ${AZURE_LOCATION} 35 networkSpec: 36 subnets: 37 - name: control-plane-subnet 38 role: control-plane 39 - name: node-subnet 40 role: node 41 vnet: 42 name: ${AZURE_VNET_NAME:=${CLUSTER_NAME}-vnet} 43 resourceGroup: ${AZURE_RESOURCE_GROUP:=${CLUSTER_NAME}} 44 subscriptionID: ${AZURE_SUBSCRIPTION_ID} 45 --- 46 apiVersion: controlplane.cluster.x-k8s.io/v1beta1 47 kind: KubeadmControlPlane 48 metadata: 49 name: ${CLUSTER_NAME}-control-plane 50 namespace: default 51 spec: 52 kubeadmConfigSpec: 53 clusterConfiguration: 54 apiServer: 55 extraArgs: 56 cloud-provider: external 57 timeoutForControlPlane: 20m 58 controllerManager: 59 extraArgs: 60 allocate-node-cidrs: "false" 61 cloud-provider: external 62 cluster-name: ${CLUSTER_NAME} 63 etcd: 64 local: 65 dataDir: /var/lib/etcddisk/etcd 66 extraArgs: 67 quota-backend-bytes: "8589934592" 68 diskSetup: 69 filesystems: 70 - device: /dev/disk/azure/scsi1/lun0 71 extraOpts: 72 - -E 73 - lazy_itable_init=1,lazy_journal_init=1 74 filesystem: ext4 75 label: etcd_disk 76 - device: ephemeral0.1 77 filesystem: ext4 78 label: ephemeral0 79 replaceFS: ntfs 80 partitions: 81 - device: /dev/disk/azure/scsi1/lun0 82 layout: true 83 overwrite: false 84 tableType: gpt 85 files: 86 - contentFrom: 87 secret: 88 key: control-plane-azure.json 89 name: ${CLUSTER_NAME}-control-plane-azure-json 90 owner: root:root 91 path: /etc/kubernetes/azure.json 92 permissions: "0644" 93 initConfiguration: 94 nodeRegistration: 95 kubeletExtraArgs: 96 cloud-provider: external 97 name: '{{ ds.meta_data["local_hostname"] }}' 98 joinConfiguration: 99 nodeRegistration: 100 kubeletExtraArgs: 101 cloud-provider: external 102 name: '{{ ds.meta_data["local_hostname"] }}' 103 mounts: 104 - - LABEL=etcd_disk 105 - /var/lib/etcddisk 106 postKubeadmCommands: [] 107 preKubeadmCommands: [] 108 machineTemplate: 109 infrastructureRef: 110 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 111 kind: AzureMachineTemplate 112 name: ${CLUSTER_NAME}-control-plane 113 replicas: ${CONTROL_PLANE_MACHINE_COUNT:=1} 114 version: ${KUBERNETES_VERSION} 115 --- 116 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 117 kind: AzureMachineTemplate 118 metadata: 119 name: ${CLUSTER_NAME}-control-plane 120 namespace: default 121 spec: 122 template: 123 spec: 124 dataDisks: 125 - diskSizeGB: 256 126 lun: 0 127 nameSuffix: etcddisk 128 osDisk: 129 diskSizeGB: 128 130 osType: Linux 131 sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""} 132 vmSize: ${AZURE_CONTROL_PLANE_MACHINE_TYPE} 133 --- 134 apiVersion: cluster.x-k8s.io/v1beta1 135 kind: MachineDeployment 136 metadata: 137 name: ${CLUSTER_NAME}-md-0 138 namespace: default 139 spec: 140 clusterName: ${CLUSTER_NAME} 141 replicas: ${WORKER_MACHINE_COUNT:=2} 142 selector: 143 matchLabels: null 144 template: 145 spec: 146 bootstrap: 147 configRef: 148 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 149 kind: KubeadmConfigTemplate 150 name: ${CLUSTER_NAME}-md-0 151 clusterName: ${CLUSTER_NAME} 152 infrastructureRef: 153 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 154 kind: AzureMachineTemplate 155 name: ${CLUSTER_NAME}-md-0 156 version: ${KUBERNETES_VERSION} 157 --- 158 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 159 kind: AzureMachineTemplate 160 metadata: 161 name: ${CLUSTER_NAME}-md-0 162 namespace: default 163 spec: 164 template: 165 spec: 166 osDisk: 167 diskSizeGB: 128 168 osType: Linux 169 sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""} 170 vmSize: ${AZURE_NODE_MACHINE_TYPE} 171 --- 172 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 173 kind: KubeadmConfigTemplate 174 metadata: 175 name: ${CLUSTER_NAME}-md-0 176 namespace: default 177 spec: 178 template: 179 spec: 180 files: 181 - contentFrom: 182 secret: 183 key: worker-node-azure.json 184 name: ${CLUSTER_NAME}-md-0-azure-json 185 owner: root:root 186 path: /etc/kubernetes/azure.json 187 permissions: "0644" 188 joinConfiguration: 189 nodeRegistration: 190 kubeletExtraArgs: 191 cloud-provider: external 192 name: '{{ ds.meta_data["local_hostname"] }}' 193 preKubeadmCommands: [] 194 --- 195 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 196 kind: AzureClusterIdentity 197 metadata: 198 labels: 199 clusterctl.cluster.x-k8s.io/move-hierarchy: "true" 200 name: ${CLUSTER_IDENTITY_NAME} 201 namespace: default 202 spec: 203 allowedNamespaces: {} 204 clientID: ${AZURE_CLIENT_ID} 205 clientSecret: 206 name: ${AZURE_CLUSTER_IDENTITY_SECRET_NAME} 207 namespace: ${AZURE_CLUSTER_IDENTITY_SECRET_NAMESPACE} 208 tenantID: ${AZURE_TENANT_ID} 209 type: ServicePrincipal 210 --- 211 apiVersion: cluster.x-k8s.io/v1beta1 212 kind: MachineDeployment 213 metadata: 214 name: ${CLUSTER_NAME}-md-win 215 namespace: default 216 spec: 217 clusterName: ${CLUSTER_NAME} 218 replicas: ${WORKER_MACHINE_COUNT:=2} 219 selector: 220 matchLabels: null 221 template: 222 spec: 223 bootstrap: 224 configRef: 225 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 226 kind: KubeadmConfigTemplate 227 name: ${CLUSTER_NAME}-md-win 228 clusterName: ${CLUSTER_NAME} 229 infrastructureRef: 230 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 231 kind: AzureMachineTemplate 232 name: ${CLUSTER_NAME}-md-win 233 version: ${KUBERNETES_VERSION} 234 --- 235 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 236 kind: AzureMachineTemplate 237 metadata: 238 annotations: 239 runtime: containerd 240 name: ${CLUSTER_NAME}-md-win 241 namespace: default 242 spec: 243 template: 244 metadata: 245 annotations: 246 runtime: containerd 247 spec: 248 osDisk: 249 diskSizeGB: 128 250 managedDisk: 251 storageAccountType: Premium_LRS 252 osType: Windows 253 sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""} 254 vmSize: ${AZURE_NODE_MACHINE_TYPE} 255 --- 256 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 257 kind: KubeadmConfigTemplate 258 metadata: 259 name: ${CLUSTER_NAME}-md-win 260 namespace: default 261 spec: 262 template: 263 spec: 264 files: 265 - contentFrom: 266 secret: 267 key: worker-node-azure.json 268 name: ${CLUSTER_NAME}-md-win-azure-json 269 owner: root:root 270 path: c:/k/azure.json 271 permissions: "0644" 272 - content: |- 273 Add-MpPreference -ExclusionProcess C:/opt/cni/bin/calico.exe 274 Add-MpPreference -ExclusionProcess C:/opt/cni/bin/calico-ipam.exe 275 path: C:/defender-exclude-calico.ps1 276 permissions: "0744" 277 joinConfiguration: 278 nodeRegistration: 279 criSocket: npipe:////./pipe/containerd-containerd 280 kubeletExtraArgs: 281 cloud-provider: external 282 v: "2" 283 windows-priorityclass: ABOVE_NORMAL_PRIORITY_CLASS 284 name: '{{ ds.meta_data["local_hostname"] }}' 285 postKubeadmCommands: 286 - nssm set kubelet start SERVICE_AUTO_START 287 - powershell C:/defender-exclude-calico.ps1 288 preKubeadmCommands: [] 289 users: 290 - groups: Administrators 291 name: capi 292 sshAuthorizedKeys: 293 - ${AZURE_SSH_PUBLIC_KEY:=""}