sigs.k8s.io/cluster-api-provider-azure@v1.14.3/templates/flavors/flatcar/machine-deployment.yaml (about) 1 --- 2 apiVersion: cluster.x-k8s.io/v1beta1 3 kind: MachineDeployment 4 metadata: 5 name: ${CLUSTER_NAME}-md-0 6 spec: 7 clusterName: ${CLUSTER_NAME} 8 replicas: ${WORKER_MACHINE_COUNT:=2} 9 selector: 10 matchLabels: null 11 template: 12 spec: 13 bootstrap: 14 configRef: 15 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 16 kind: KubeadmConfigTemplate 17 name: ${CLUSTER_NAME}-md-0 18 clusterName: ${CLUSTER_NAME} 19 infrastructureRef: 20 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 21 kind: AzureMachineTemplate 22 name: ${CLUSTER_NAME}-md-0 23 version: ${KUBERNETES_VERSION} 24 --- 25 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 26 kind: AzureMachineTemplate 27 metadata: 28 name: ${CLUSTER_NAME}-md-0 29 spec: 30 template: 31 spec: 32 image: 33 computeGallery: 34 gallery: flatcar4capi-742ef0cb-dcaa-4ecb-9cb0-bfd2e43dccc0 35 name: flatcar-stable-amd64-capi-${KUBERNETES_VERSION} 36 version: ${FLATCAR_VERSION} 37 osDisk: 38 diskSizeGB: 128 39 osType: Linux 40 sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""} 41 vmSize: ${AZURE_NODE_MACHINE_TYPE} 42 --- 43 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 44 kind: KubeadmConfigTemplate 45 metadata: 46 name: ${CLUSTER_NAME}-md-0 47 spec: 48 template: 49 spec: 50 files: 51 - contentFrom: 52 secret: 53 key: worker-node-azure.json 54 name: ${CLUSTER_NAME}-md-0-azure-json 55 owner: root:root 56 path: /etc/kubernetes/azure.json 57 permissions: "0644" 58 format: ignition 59 ignition: 60 containerLinuxConfig: 61 additionalConfig: | 62 systemd: 63 units: 64 - name: kubeadm.service 65 dropins: 66 - name: 10-flatcar.conf 67 contents: | 68 [Unit] 69 After=oem-cloudinit.service 70 # kubeadm must run after containerd - see https://github.com/kubernetes-sigs/image-builder/issues/939. 71 After=containerd.service 72 joinConfiguration: 73 nodeRegistration: 74 kubeletExtraArgs: 75 cloud-provider: external 76 name: '@@HOSTNAME@@' 77 postKubeadmCommands: [] 78 preKubeadmCommands: 79 - sed -i "s/@@HOSTNAME@@/$(curl -s -H Metadata:true --noproxy '*' 'http://169.254.169.254/metadata/instance?api-version=2020-09-01' | jq -r .compute.name)/g" /etc/kubeadm.yml