sigs.k8s.io/cluster-api-provider-azure@v1.14.3/templates/flavors/aks/cluster-template.yaml (about)

     1  ---
     2  # The Cluster object is the top level owner of all resources.
     3  # It coordinates between the control plane and the infrastructure/machines.
     4  apiVersion: cluster.x-k8s.io/v1beta1
     5  kind: Cluster
     6  metadata:
     7    name: ${CLUSTER_NAME}
     8    namespace: default
     9  spec:
    10    clusterNetwork:
    11      services:
    12        cidrBlocks:
    13        - 192.168.0.0/16
    14    controlPlaneRef:
    15      apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    16      kind: AzureManagedControlPlane
    17      name: ${CLUSTER_NAME}
    18    infrastructureRef:
    19      apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    20      kind: AzureManagedCluster
    21      name: ${CLUSTER_NAME}
    22  ---
    23  # The control plane abstracts readiness and provisioning of an AKS cluster.
    24  # Because AKS requires a default pool, this also requires a reference to the
    25  # default machine pool.
    26  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    27  kind: AzureManagedControlPlane
    28  metadata:
    29    name: ${CLUSTER_NAME}
    30  spec:
    31    subscriptionID: ${AZURE_SUBSCRIPTION_ID}
    32    resourceGroupName: "${AZURE_RESOURCE_GROUP:=${CLUSTER_NAME}}"
    33    location: "${AZURE_LOCATION}"
    34    sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""}
    35    version: "${KUBERNETES_VERSION}"
    36    oidcIssuerProfile:
    37      enabled: true
    38  ---
    39  # Due to the nature of managed Kubernetes and the control plane implementation,
    40  # the infrastructure provider for AKS cluster is basically a no-op.
    41  # It sets itself to ready as soon as it sees the control plane ready.
    42  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    43  kind: AzureManagedCluster
    44  metadata:
    45    name: ${CLUSTER_NAME}
    46  ---
    47  # We provision a default machine pool with no bootstrap data (AKS will provide it).
    48  # We specify an AzureManagedMachinePool as the infrastructure machine it, which
    49  # will be reflected in Azure as VMSS node pools attached to an AKS cluster.
    50  apiVersion: cluster.x-k8s.io/v1beta1
    51  kind: MachinePool
    52  metadata:
    53    name: "${CLUSTER_NAME}-pool0"
    54  spec:
    55    clusterName: "${CLUSTER_NAME}"
    56    replicas: ${WORKER_MACHINE_COUNT:=2}
    57    template:
    58      metadata: {}
    59      spec:
    60        bootstrap:
    61          dataSecretName: ""
    62        clusterName: "${CLUSTER_NAME}"
    63        infrastructureRef:
    64          apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    65          kind: AzureManagedMachinePool
    66          name: "${CLUSTER_NAME}-pool0"
    67        version: "${KUBERNETES_VERSION}"
    68  ---
    69  # This first Azure-specific machine pool implementation drives the configuration of the
    70  # AKS "System" node pool to schedule and run kube-system and other system pods
    71  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    72  kind: AzureManagedMachinePool
    73  metadata:
    74    name: "${CLUSTER_NAME}-pool0"
    75  spec:
    76    mode: System
    77    sku: "${AZURE_NODE_MACHINE_TYPE}"
    78    name: pool0
    79  ---
    80  # Deploy a second agent pool with the same number of machines, but using potentially different infrastructure.
    81  apiVersion: cluster.x-k8s.io/v1beta1
    82  kind: MachinePool
    83  metadata:
    84    name: "${CLUSTER_NAME}-pool1"
    85  spec:
    86    clusterName: "${CLUSTER_NAME}"
    87    replicas: ${WORKER_MACHINE_COUNT:=2}
    88    template:
    89      metadata: {}
    90      spec:
    91        bootstrap:
    92          dataSecretName: ""
    93        clusterName: "${CLUSTER_NAME}"
    94        infrastructureRef:
    95          apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    96          kind: AzureManagedMachinePool
    97          name: "${CLUSTER_NAME}-pool1"
    98        version: "${KUBERNETES_VERSION}"
    99  ---
   100  # This first Azure-specific machine pool implementation drives the configuration of the
   101  # AKS "User" node pool to schedule and run user workloads
   102  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   103  kind: AzureManagedMachinePool
   104  metadata:
   105    name: "${CLUSTER_NAME}-pool1"
   106  spec:
   107    mode: User
   108    sku: "${AZURE_NODE_MACHINE_TYPE}"
   109    name: pool1