sigs.k8s.io/cluster-api-provider-aws@v1.5.5/templates/cluster-template-machinepool.yaml (about)

     1  ---
     2  apiVersion: cluster.x-k8s.io/v1beta1
     3  kind: Cluster
     4  metadata:
     5    name: "${CLUSTER_NAME}"
     6  spec:
     7    infrastructureRef:
     8      apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
     9      kind: AWSCluster
    10      name: "${CLUSTER_NAME}"
    11    controlPlaneRef:
    12      kind: KubeadmControlPlane
    13      apiVersion: controlplane.cluster.x-k8s.io/v1beta1
    14      name: "${CLUSTER_NAME}-control-plane"
    15  ---
    16  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    17  kind: AWSCluster
    18  metadata:
    19    name: "${CLUSTER_NAME}"
    20  spec:
    21    region: "${AWS_REGION}"
    22    sshKeyName: "${AWS_SSH_KEY_NAME}"
    23  ---
    24  kind: KubeadmControlPlane
    25  apiVersion: controlplane.cluster.x-k8s.io/v1beta1
    26  metadata:
    27    name: "${CLUSTER_NAME}-control-plane"
    28  spec:
    29    replicas: ${CONTROL_PLANE_MACHINE_COUNT}
    30    machineTemplate:
    31      infrastructureRef:
    32        kind: AWSMachineTemplate
    33        apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    34        name: "${CLUSTER_NAME}-control-plane"
    35    kubeadmConfigSpec:
    36      initConfiguration:
    37        nodeRegistration:
    38          name: '{{ ds.meta_data.local_hostname }}'
    39          kubeletExtraArgs:
    40            cloud-provider: aws
    41      clusterConfiguration:
    42        apiServer:
    43          extraArgs:
    44            cloud-provider: aws
    45        controllerManager:
    46          extraArgs:
    47            cloud-provider: aws
    48      joinConfiguration:
    49        nodeRegistration:
    50          name: '{{ ds.meta_data.local_hostname }}'
    51          kubeletExtraArgs:
    52            cloud-provider: aws
    53    version: "${KUBERNETES_VERSION}"
    54  ---
    55  kind: AWSMachineTemplate
    56  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    57  metadata:
    58    name: "${CLUSTER_NAME}-control-plane"
    59  spec:
    60    template:
    61      spec:
    62        instanceType: "${AWS_CONTROL_PLANE_MACHINE_TYPE}"
    63        iamInstanceProfile: "control-plane.cluster-api-provider-aws.sigs.k8s.io"
    64        sshKeyName: "${AWS_SSH_KEY_NAME}"
    65  ---
    66  apiVersion: cluster.x-k8s.io/v1beta1
    67  kind: MachinePool
    68  metadata:
    69    name: ${CLUSTER_NAME}-mp-0
    70    namespace: default
    71  spec:
    72    clusterName: ${CLUSTER_NAME}
    73    replicas: ${WORKER_MACHINE_COUNT}
    74    template:
    75      spec:
    76        bootstrap:
    77          configRef:
    78            apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
    79            kind: KubeadmConfig
    80            name: ${CLUSTER_NAME}-mp-0
    81        clusterName: ${CLUSTER_NAME}
    82        infrastructureRef:
    83          apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    84          kind: AWSMachinePool
    85          name: ${CLUSTER_NAME}-mp-0
    86        version: ${KUBERNETES_VERSION}
    87  ---
    88  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    89  kind: AWSMachinePool
    90  metadata:
    91    name: ${CLUSTER_NAME}-mp-0
    92    namespace: default
    93  spec:
    94    minSize: 1
    95    maxSize: 10
    96    availabilityZones:
    97      - "${AWS_AVAILABILITY_ZONE}"
    98    awsLaunchTemplate:
    99      iamInstanceProfile: nodes.cluster-api-provider-aws.sigs.k8s.io
   100      instanceType: "${AWS_NODE_MACHINE_TYPE}"
   101      sshKeyName: "${AWS_SSH_KEY_NAME}"
   102  ---
   103  apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
   104  kind: KubeadmConfig
   105  metadata:
   106    name: ${CLUSTER_NAME}-mp-0
   107    namespace: default
   108  spec:
   109    joinConfiguration:
   110      nodeRegistration:
   111        name: '{{ ds.meta_data.local_hostname }}'
   112        kubeletExtraArgs:
   113          cloud-provider: aws