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