--- apiVersion: cluster.x-k8s.io/v1beta1 kind: Cluster metadata: name: "${CLUSTER_NAME}" spec: clusterNetwork: pods: cidrBlocks: ["192.168.0.0/16"] infrastructureRef: apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: GCPCluster name: "${CLUSTER_NAME}" controlPlaneRef: kind: KubeadmControlPlane apiVersion: controlplane.cluster.x-k8s.io/v1beta1 name: "${CLUSTER_NAME}-control-plane" --- apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: GCPCluster metadata: name: "${CLUSTER_NAME}" spec: project: "${GCP_PROJECT}" region: "${GCP_REGION}" network: name: "${GCP_NETWORK_NAME}" --- kind: KubeadmControlPlane apiVersion: controlplane.cluster.x-k8s.io/v1beta1 metadata: name: "${CLUSTER_NAME}-control-plane" spec: replicas: ${CONTROL_PLANE_MACHINE_COUNT} machineTemplate: infrastructureRef: kind: GCPMachineTemplate apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 name: "${CLUSTER_NAME}-control-plane" kubeadmConfigSpec: initConfiguration: nodeRegistration: name: '{{ ds.meta_data.local_hostname.split(".")[0] }}' kubeletExtraArgs: cloud-provider: gce feature-gates: "DisableCloudProviders=false,DisableKubeletCloudCredentialProviders=false" clusterConfiguration: apiServer: timeoutForControlPlane: 20m controllerManager: extraArgs: cloud-provider: gce feature-gates: "DisableCloudProviders=false,DisableKubeletCloudCredentialProviders=false" allocate-node-cidrs: "false" joinConfiguration: nodeRegistration: name: '{{ ds.meta_data.local_hostname.split(".")[0] }}' kubeletExtraArgs: cloud-provider: gce feature-gates: "DisableCloudProviders=false,DisableKubeletCloudCredentialProviders=false" version: "${KUBERNETES_VERSION}" --- kind: GCPMachineTemplate apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 metadata: name: "${CLUSTER_NAME}-control-plane" spec: template: spec: instanceType: "${GCP_CONTROL_PLANE_MACHINE_TYPE}" image: "${IMAGE_ID}" --- apiVersion: cluster.x-k8s.io/v1beta1 kind: MachineDeployment metadata: name: "${CLUSTER_NAME}-md-0" spec: clusterName: "${CLUSTER_NAME}" replicas: ${WORKER_MACHINE_COUNT} selector: matchLabels: template: spec: clusterName: "${CLUSTER_NAME}" version: "${KUBERNETES_VERSION}" bootstrap: configRef: name: "${CLUSTER_NAME}-md-0" apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfigTemplate infrastructureRef: name: "${CLUSTER_NAME}-md-0" apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: GCPMachineTemplate --- apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: GCPMachineTemplate metadata: name: "${CLUSTER_NAME}-md-0" spec: template: spec: instanceType: "${GCP_NODE_MACHINE_TYPE}" image: "${IMAGE_ID}" --- apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfigTemplate metadata: name: "${CLUSTER_NAME}-md-0" spec: template: spec: joinConfiguration: nodeRegistration: name: '{{ ds.meta_data.local_hostname.split(".")[0] }}' kubeletExtraArgs: cloud-provider: gce feature-gates: "DisableCloudProviders=false,DisableKubeletCloudCredentialProviders=false"