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