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