mirror of https://github.com/kubernetes/kops.git
				
				
				
			
		
			
				
	
	
		
			129 lines
		
	
	
		
			3.4 KiB
		
	
	
	
		
			YAML
		
	
	
	
			
		
		
	
	
			129 lines
		
	
	
		
			3.4 KiB
		
	
	
	
		
			YAML
		
	
	
	
| ---
 | |
| 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: KopsControlPlane
 | |
|     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
 | |
| #     clusterConfiguration:
 | |
| #       apiServer:
 | |
| #         timeoutForControlPlane: 20m
 | |
| #         extraArgs:
 | |
| #           cloud-provider: gce
 | |
| #       controllerManager:
 | |
| #         extraArgs:
 | |
| #           cloud-provider: gce
 | |
| #           allocate-node-cidrs: "false"
 | |
| #     joinConfiguration:
 | |
| #       nodeRegistration:
 | |
| #         name: '{{ ds.meta_data.local_hostname.split(".")[0] }}'
 | |
| #         kubeletExtraArgs:
 | |
| #           cloud-provider: gce
 | |
| #   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}"
 | |
|       failureDomain: "${GCP_ZONE}" 
 | |
|       bootstrap:
 | |
|         configRef:
 | |
|           name: "${CLUSTER_NAME}-md-0"
 | |
|           apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
 | |
|           kind: KopsConfigTemplate
 | |
|       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}"
 | |
|       subnet: "${GCP_SUBNET}"
 | |
|       additionalNetworkTags:
 | |
|       - clusterapi-k8s-local-k8s-io-role-node
 | |
|       publicIP: true
 | |
|       additionalMetadata:
 | |
|       - key: kops-k8s-io-instance-group-name
 | |
|         value: nodes-us-east4-a
 | |
|       - key: cluster-name
 | |
|         value: clusterapi.k8s.local
 | |
| 
 | |
| 
 | |
| ---
 | |
| apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
 | |
| kind: KopsConfigTemplate
 | |
| metadata:
 | |
|   name: "${CLUSTER_NAME}-md-0"
 | |
| spec:
 | |
|   template:
 | |
|     spec: {}
 | |
|       #joinConfiguration:
 | |
|       #  nodeRegistration:
 | |
|       #    name: '{{ ds.meta_data.local_hostname.split(".")[0] }}'
 | |
|       #    kubeletExtraArgs:
 | |
|       #      cloud-provider: gce
 |