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