|
| 1 | +--- |
| 2 | +apiVersion: cluster.x-k8s.io/v1beta1 |
| 3 | +kind: Cluster |
| 4 | +metadata: |
| 5 | + name: "${CLUSTER_NAME}" |
| 6 | + labels: |
| 7 | + cni: "${CLUSTER_NAME}-shared-vpc" |
| 8 | +spec: |
| 9 | + clusterNetwork: |
| 10 | + pods: |
| 11 | + cidrBlocks: ["192.168.0.0/16"] |
| 12 | + infrastructureRef: |
| 13 | + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 |
| 14 | + kind: GCPCluster |
| 15 | + name: "${CLUSTER_NAME}" |
| 16 | + controlPlaneRef: |
| 17 | + kind: KubeadmControlPlane |
| 18 | + apiVersion: controlplane.cluster.x-k8s.io/v1beta1 |
| 19 | + name: "${CLUSTER_NAME}-control-plane" |
| 20 | +--- |
| 21 | +apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 |
| 22 | +kind: GCPCluster |
| 23 | +metadata: |
| 24 | + name: "${CLUSTER_NAME}" |
| 25 | +spec: |
| 26 | + project: "${GCP_SERVICE_PROJECT}" |
| 27 | + region: "${GCP_REGION}" |
| 28 | + network: |
| 29 | + name: "${GCP_NETWORK_NAME}" |
| 30 | + hostProject: "${GCP_PROJECT}" |
| 31 | +--- |
| 32 | +apiVersion: controlplane.cluster.x-k8s.io/v1beta1 |
| 33 | +kind: KubeadmControlPlane |
| 34 | +metadata: |
| 35 | + name: "${CLUSTER_NAME}-control-plane" |
| 36 | +spec: |
| 37 | + replicas: ${CONTROL_PLANE_MACHINE_COUNT} |
| 38 | + machineTemplate: |
| 39 | + infrastructureRef: |
| 40 | + kind: GCPMachineTemplate |
| 41 | + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 |
| 42 | + name: "${CLUSTER_NAME}-control-plane" |
| 43 | + kubeadmConfigSpec: |
| 44 | + useExperimentalRetryJoin: true |
| 45 | + initConfiguration: |
| 46 | + nodeRegistration: |
| 47 | + name: '{{ ds.meta_data.local_hostname.split(".")[0] }}' |
| 48 | + kubeletExtraArgs: |
| 49 | + cloud-provider: gce |
| 50 | + clusterConfiguration: |
| 51 | + apiServer: |
| 52 | + timeoutForControlPlane: 20m |
| 53 | + extraArgs: |
| 54 | + cloud-provider: gce |
| 55 | + controllerManager: |
| 56 | + extraArgs: |
| 57 | + cloud-provider: gce |
| 58 | + allocate-node-cidrs: "false" |
| 59 | + kubernetesVersion: "${KUBERNETES_VERSION}" |
| 60 | + joinConfiguration: |
| 61 | + nodeRegistration: |
| 62 | + name: '{{ ds.meta_data.local_hostname.split(".")[0] }}' |
| 63 | + kubeletExtraArgs: |
| 64 | + cloud-provider: gce |
| 65 | + version: "${KUBERNETES_VERSION}" |
| 66 | +--- |
| 67 | +apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 |
| 68 | +kind: GCPMachineTemplate |
| 69 | +metadata: |
| 70 | + name: "${CLUSTER_NAME}-control-plane" |
| 71 | +spec: |
| 72 | + template: |
| 73 | + spec: |
| 74 | + instanceType: "${GCP_CONTROL_PLANE_MACHINE_TYPE}" |
| 75 | + image: "${IMAGE_ID}" |
| 76 | +--- |
| 77 | +apiVersion: cluster.x-k8s.io/v1beta1 |
| 78 | +kind: MachineDeployment |
| 79 | +metadata: |
| 80 | + name: "${CLUSTER_NAME}-md-0" |
| 81 | +spec: |
| 82 | + clusterName: "${CLUSTER_NAME}" |
| 83 | + replicas: ${WORKER_MACHINE_COUNT} |
| 84 | + selector: |
| 85 | + matchLabels: |
| 86 | + template: |
| 87 | + spec: |
| 88 | + clusterName: "${CLUSTER_NAME}" |
| 89 | + version: "${KUBERNETES_VERSION}" |
| 90 | + bootstrap: |
| 91 | + configRef: |
| 92 | + name: "${CLUSTER_NAME}-md-0" |
| 93 | + apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 |
| 94 | + kind: KubeadmConfigTemplate |
| 95 | + infrastructureRef: |
| 96 | + name: "${CLUSTER_NAME}-md-0" |
| 97 | + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 |
| 98 | + kind: GCPMachineTemplate |
| 99 | +--- |
| 100 | +apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 |
| 101 | +kind: GCPMachineTemplate |
| 102 | +metadata: |
| 103 | + name: "${CLUSTER_NAME}-md-0" |
| 104 | +spec: |
| 105 | + template: |
| 106 | + spec: |
| 107 | + instanceType: "${GCP_NODE_MACHINE_TYPE}" |
| 108 | + image: "${IMAGE_ID}" |
| 109 | +--- |
| 110 | +apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 |
| 111 | +kind: KubeadmConfigTemplate |
| 112 | +metadata: |
| 113 | + name: "${CLUSTER_NAME}-md-0" |
| 114 | +spec: |
| 115 | + template: |
| 116 | + spec: |
| 117 | + joinConfiguration: |
| 118 | + nodeRegistration: |
| 119 | + name: '{{ ds.meta_data.local_hostname.split(".")[0] }}' |
| 120 | + kubeletExtraArgs: |
| 121 | + cloud-provider: gce |
0 commit comments