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