sigs.k8s.io/cluster-api-provider-azure@v1.14.3/templates/cluster-template-aad.yaml (about) 1 apiVersion: cluster.x-k8s.io/v1beta1 2 kind: Cluster 3 metadata: 4 name: ${CLUSTER_NAME} 5 namespace: default 6 spec: 7 clusterNetwork: 8 pods: 9 cidrBlocks: 10 - 192.168.0.0/16 11 controlPlaneRef: 12 apiVersion: controlplane.cluster.x-k8s.io/v1beta1 13 kind: KubeadmControlPlane 14 name: ${CLUSTER_NAME}-control-plane 15 infrastructureRef: 16 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 17 kind: AzureCluster 18 name: ${CLUSTER_NAME} 19 --- 20 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 21 kind: AzureCluster 22 metadata: 23 name: ${CLUSTER_NAME} 24 namespace: default 25 spec: 26 identityRef: 27 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 28 kind: AzureClusterIdentity 29 name: ${CLUSTER_IDENTITY_NAME} 30 location: ${AZURE_LOCATION} 31 networkSpec: 32 subnets: 33 - name: control-plane-subnet 34 role: control-plane 35 - name: node-subnet 36 role: node 37 vnet: 38 name: ${AZURE_VNET_NAME:=${CLUSTER_NAME}-vnet} 39 resourceGroup: ${AZURE_RESOURCE_GROUP:=${CLUSTER_NAME}} 40 subscriptionID: ${AZURE_SUBSCRIPTION_ID} 41 --- 42 apiVersion: controlplane.cluster.x-k8s.io/v1beta1 43 kind: KubeadmControlPlane 44 metadata: 45 name: ${CLUSTER_NAME}-control-plane 46 namespace: default 47 spec: 48 kubeadmConfigSpec: 49 clusterConfiguration: 50 apiServer: 51 extraArgs: 52 cloud-provider: external 53 oidc-client-id: ${AZURE_SERVER_APP_ID} 54 oidc-groups-claim: groups 55 oidc-issuer-url: https://sts.windows.net/${AZURE_TENANT_ID}/ 56 oidc-username-claim: oid 57 oidc-username-prefix: '-' 58 timeoutForControlPlane: 20m 59 controllerManager: 60 extraArgs: 61 allocate-node-cidrs: "false" 62 cloud-provider: external 63 cluster-name: ${CLUSTER_NAME} 64 etcd: 65 local: 66 dataDir: /var/lib/etcddisk/etcd 67 extraArgs: 68 quota-backend-bytes: "8589934592" 69 diskSetup: 70 filesystems: 71 - device: /dev/disk/azure/scsi1/lun0 72 extraOpts: 73 - -E 74 - lazy_itable_init=1,lazy_journal_init=1 75 filesystem: ext4 76 label: etcd_disk 77 - device: ephemeral0.1 78 filesystem: ext4 79 label: ephemeral0 80 replaceFS: ntfs 81 partitions: 82 - device: /dev/disk/azure/scsi1/lun0 83 layout: true 84 overwrite: false 85 tableType: gpt 86 files: 87 - contentFrom: 88 secret: 89 key: control-plane-azure.json 90 name: ${CLUSTER_NAME}-control-plane-azure-json 91 owner: root:root 92 path: /etc/kubernetes/azure.json 93 permissions: "0644" 94 initConfiguration: 95 nodeRegistration: 96 kubeletExtraArgs: 97 cloud-provider: external 98 name: '{{ ds.meta_data["local_hostname"] }}' 99 joinConfiguration: 100 nodeRegistration: 101 kubeletExtraArgs: 102 cloud-provider: external 103 name: '{{ ds.meta_data["local_hostname"] }}' 104 mounts: 105 - - LABEL=etcd_disk 106 - /var/lib/etcddisk 107 postKubeadmCommands: [] 108 preKubeadmCommands: [] 109 machineTemplate: 110 infrastructureRef: 111 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 112 kind: AzureMachineTemplate 113 name: ${CLUSTER_NAME}-control-plane 114 replicas: ${CONTROL_PLANE_MACHINE_COUNT:=1} 115 version: ${KUBERNETES_VERSION} 116 --- 117 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 118 kind: AzureMachineTemplate 119 metadata: 120 name: ${CLUSTER_NAME}-control-plane 121 namespace: default 122 spec: 123 template: 124 spec: 125 dataDisks: 126 - diskSizeGB: 256 127 lun: 0 128 nameSuffix: etcddisk 129 osDisk: 130 diskSizeGB: 128 131 osType: Linux 132 sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""} 133 vmSize: ${AZURE_CONTROL_PLANE_MACHINE_TYPE} 134 --- 135 apiVersion: cluster.x-k8s.io/v1beta1 136 kind: MachineDeployment 137 metadata: 138 name: ${CLUSTER_NAME}-md-0 139 namespace: default 140 spec: 141 clusterName: ${CLUSTER_NAME} 142 replicas: ${WORKER_MACHINE_COUNT:=2} 143 selector: 144 matchLabels: null 145 template: 146 spec: 147 bootstrap: 148 configRef: 149 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 150 kind: KubeadmConfigTemplate 151 name: ${CLUSTER_NAME}-md-0 152 clusterName: ${CLUSTER_NAME} 153 infrastructureRef: 154 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 155 kind: AzureMachineTemplate 156 name: ${CLUSTER_NAME}-md-0 157 version: ${KUBERNETES_VERSION} 158 --- 159 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 160 kind: AzureMachineTemplate 161 metadata: 162 name: ${CLUSTER_NAME}-md-0 163 namespace: default 164 spec: 165 template: 166 spec: 167 osDisk: 168 diskSizeGB: 128 169 managedDisk: 170 storageAccountType: Premium_LRS 171 osType: Linux 172 sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""} 173 vmSize: ${AZURE_NODE_MACHINE_TYPE} 174 --- 175 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 176 kind: KubeadmConfigTemplate 177 metadata: 178 name: ${CLUSTER_NAME}-md-0 179 namespace: default 180 spec: 181 template: 182 spec: 183 files: 184 - contentFrom: 185 secret: 186 key: worker-node-azure.json 187 name: ${CLUSTER_NAME}-md-0-azure-json 188 owner: root:root 189 path: /etc/kubernetes/azure.json 190 permissions: "0644" 191 joinConfiguration: 192 nodeRegistration: 193 kubeletExtraArgs: 194 cloud-provider: external 195 name: '{{ ds.meta_data["local_hostname"] }}' 196 --- 197 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 198 kind: AzureClusterIdentity 199 metadata: 200 labels: 201 clusterctl.cluster.x-k8s.io/move-hierarchy: "true" 202 name: ${CLUSTER_IDENTITY_NAME} 203 namespace: default 204 spec: 205 allowedNamespaces: {} 206 clientID: ${AZURE_CLIENT_ID} 207 clientSecret: 208 name: ${AZURE_CLUSTER_IDENTITY_SECRET_NAME} 209 namespace: ${AZURE_CLUSTER_IDENTITY_SECRET_NAMESPACE} 210 tenantID: ${AZURE_TENANT_ID} 211 type: ServicePrincipal