sigs.k8s.io/cluster-api-provider-aws@v1.5.5/templates/cluster-template-simple-clusterclass.yaml (about) 1 apiVersion: cluster.x-k8s.io/v1beta1 2 kind: Cluster 3 metadata: 4 labels: 5 cni: ${CLUSTER_NAME}-crs-0 6 name: ${CLUSTER_NAME} 7 spec: 8 clusterNetwork: 9 pods: 10 cidrBlocks: 11 - 192.168.0.0/16 12 topology: 13 class: quick-start 14 controlPlane: 15 replicas: ${CONTROL_PLANE_MACHINE_COUNT} 16 variables: 17 - name: region 18 value: ${AWS_REGION} 19 - name: sshKeyName 20 value: ${AWS_SSH_KEY_NAME} 21 - name: controlPlaneMachineType 22 value: ${AWS_CONTROL_PLANE_MACHINE_TYPE} 23 - name: workerMachineType 24 value: ${AWS_NODE_MACHINE_TYPE} 25 version: ${KUBERNETES_VERSION} 26 workers: 27 machineDeployments: 28 - class: default-worker 29 name: md-0 30 replicas: ${WORKER_MACHINE_COUNT} 31 --- 32 apiVersion: cluster.x-k8s.io/v1beta1 33 kind: ClusterClass 34 metadata: 35 name: quick-start 36 spec: 37 controlPlane: 38 ref: 39 apiVersion: controlplane.cluster.x-k8s.io/v1beta1 40 kind: KubeadmControlPlaneTemplate 41 name: quick-start-control-plane 42 machineInfrastructure: 43 ref: 44 kind: AWSMachineTemplate 45 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 46 name: quick-start-control-plane 47 infrastructure: 48 ref: 49 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 50 kind: AWSClusterTemplate 51 name: quick-start 52 workers: 53 machineDeployments: 54 - class: default-worker 55 template: 56 bootstrap: 57 ref: 58 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 59 kind: KubeadmConfigTemplate 60 name: quick-start-worker-bootstraptemplate 61 infrastructure: 62 ref: 63 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 64 kind: AWSMachineTemplate 65 name: quick-start-worker-machinetemplate 66 variables: 67 - name: region 68 required: true 69 schema: 70 openAPIV3Schema: 71 type: string 72 default: us-east-1 73 - name: sshKeyName 74 required: true 75 schema: 76 openAPIV3Schema: 77 type: string 78 default: default 79 - name: controlPlaneMachineType 80 required: true 81 schema: 82 openAPIV3Schema: 83 type: string 84 default: t3.large 85 - name: workerMachineType 86 required: true 87 schema: 88 openAPIV3Schema: 89 type: string 90 default: t3.large 91 patches: 92 - name: region 93 definitions: 94 - selector: 95 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 96 kind: AWSClusterTemplate 97 matchResources: 98 infrastructureCluster: true 99 jsonPatches: 100 - op: add 101 path: /spec/template/spec/region 102 valueFrom: 103 variable: region 104 - name: sshKeyName 105 definitions: 106 - selector: 107 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 108 kind: AWSClusterTemplate 109 matchResources: 110 infrastructureCluster: true 111 jsonPatches: 112 - op: add 113 path: /spec/template/spec/sshKeyName 114 valueFrom: 115 variable: sshKeyName 116 - selector: 117 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 118 kind: AWSMachineTemplate 119 matchResources: 120 controlPlane: true 121 machineDeploymentClass: 122 names: 123 - default-worker 124 jsonPatches: 125 - op: add 126 path: /spec/template/spec/sshKeyName 127 valueFrom: 128 variable: sshKeyName 129 - name: controlPlaneMachineType 130 definitions: 131 - selector: 132 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 133 kind: AWSMachineTemplate 134 matchResources: 135 controlPlane: true 136 jsonPatches: 137 - op: replace 138 path: /spec/template/spec/instanceType 139 valueFrom: 140 variable: controlPlaneMachineType 141 - name: workerMachineType 142 definitions: 143 - selector: 144 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 145 kind: AWSMachineTemplate 146 matchResources: 147 machineDeploymentClass: 148 names: 149 - default-worker 150 jsonPatches: 151 - op: replace 152 path: /spec/template/spec/instanceType 153 valueFrom: 154 variable: workerMachineType 155 --- 156 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 157 kind: AWSClusterTemplate 158 metadata: 159 name: quick-start 160 spec: 161 template: 162 spec: { } 163 --- 164 kind: KubeadmControlPlaneTemplate 165 apiVersion: controlplane.cluster.x-k8s.io/v1beta1 166 metadata: 167 name: quick-start-control-plane 168 spec: 169 template: 170 spec: 171 kubeadmConfigSpec: 172 clusterConfiguration: 173 apiServer: 174 extraArgs: 175 cloud-provider: aws 176 controllerManager: 177 extraArgs: 178 cloud-provider: aws 179 initConfiguration: 180 nodeRegistration: 181 name: '{{ ds.meta_data.local_hostname }}' 182 kubeletExtraArgs: 183 cloud-provider: aws 184 joinConfiguration: 185 nodeRegistration: 186 name: '{{ ds.meta_data.local_hostname }}' 187 kubeletExtraArgs: 188 cloud-provider: aws 189 --- 190 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 191 kind: AWSMachineTemplate 192 metadata: 193 name: quick-start-control-plane 194 spec: 195 template: 196 spec: 197 # instanceType is a required field (OpenAPI schema). 198 instanceType: REPLACEME 199 iamInstanceProfile: "control-plane.cluster-api-provider-aws.sigs.k8s.io" 200 --- 201 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 202 kind: AWSMachineTemplate 203 metadata: 204 name: quick-start-worker-machinetemplate 205 spec: 206 template: 207 spec: 208 # instanceType is a required field (OpenAPI schema). 209 instanceType: REPLACEME 210 iamInstanceProfile: "nodes.cluster-api-provider-aws.sigs.k8s.io" 211 --- 212 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 213 kind: KubeadmConfigTemplate 214 metadata: 215 name: "quick-start-worker-bootstraptemplate" 216 spec: 217 template: 218 spec: 219 joinConfiguration: 220 nodeRegistration: 221 name: '{{ ds.meta_data.local_hostname }}' 222 kubeletExtraArgs: 223 cloud-provider: aws 224 --- 225 apiVersion: v1 226 data: ${CNI_RESOURCES} 227 kind: ConfigMap 228 metadata: 229 name: cni-${CLUSTER_NAME}-crs-0 230 --- 231 apiVersion: addons.cluster.x-k8s.io/v1beta1 232 kind: ClusterResourceSet 233 metadata: 234 name: ${CLUSTER_NAME}-crs-0 235 spec: 236 clusterSelector: 237 matchLabels: 238 cni: ${CLUSTER_NAME}-crs-0 239 resources: 240 - kind: ConfigMap 241 name: cni-${CLUSTER_NAME}-crs-0 242 strategy: ApplyOnce