2022-07-18 15:27:17 -04:00
|
|
|
// Module included in the following assemblies:
|
|
|
|
|
//
|
2024-05-30 12:47:38 -04:00
|
|
|
// * machine_management/cluster_api_machine_management/cluster_api_provider_configurations/cluster-api-config-options-gcp.adoc
|
2022-07-18 15:27:17 -04:00
|
|
|
|
2023-10-30 10:13:25 -04:00
|
|
|
:_mod-docs-content-type: REFERENCE
|
2022-07-18 15:27:17 -04:00
|
|
|
[id="capi-yaml-machine-template-gcp_{context}"]
|
2024-05-30 12:47:38 -04:00
|
|
|
= Sample YAML for a Cluster API machine template resource on {gcp-full}
|
2022-07-18 15:27:17 -04:00
|
|
|
|
2024-05-30 12:47:38 -04:00
|
|
|
The machine template resource is provider-specific and defines the basic properties of the machines that a compute machine set creates.
|
|
|
|
|
The compute machine set references this template when creating machines.
|
2022-07-18 15:27:17 -04:00
|
|
|
|
|
|
|
|
[source,yaml]
|
|
|
|
|
----
|
|
|
|
|
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
|
2024-03-07 14:38:05 -05:00
|
|
|
kind: GCPMachineTemplate # <1>
|
2022-07-18 15:27:17 -04:00
|
|
|
metadata:
|
2024-03-07 14:38:05 -05:00
|
|
|
name: <template_name> # <2>
|
2022-07-18 15:27:17 -04:00
|
|
|
namespace: openshift-cluster-api
|
|
|
|
|
spec:
|
|
|
|
|
template:
|
2024-03-07 14:38:05 -05:00
|
|
|
spec: # <3>
|
2022-07-18 15:27:17 -04:00
|
|
|
rootDeviceType: pd-ssd
|
|
|
|
|
rootDeviceSize: 128
|
|
|
|
|
instanceType: n1-standard-4
|
|
|
|
|
image: projects/rhcos-cloud/global/images/rhcos-411-85-202203181601-0-gcp-x86-64
|
|
|
|
|
subnet: <cluster_name>-worker-subnet
|
|
|
|
|
serviceAccounts:
|
|
|
|
|
email: <service_account_email_address>
|
|
|
|
|
scopes:
|
|
|
|
|
- https://www.googleapis.com/auth/cloud-platform
|
|
|
|
|
additionalLabels:
|
|
|
|
|
kubernetes-io-cluster-<cluster_name>: owned
|
|
|
|
|
additionalNetworkTags:
|
|
|
|
|
- <cluster_name>-worker
|
|
|
|
|
ipForwarding: Disabled
|
|
|
|
|
----
|
2024-05-30 12:47:38 -04:00
|
|
|
<1> Specify the machine template kind.
|
|
|
|
|
This value must match the value for your platform.
|
2022-07-18 15:27:17 -04:00
|
|
|
<2> Specify a name for the machine template.
|
2024-05-30 12:47:38 -04:00
|
|
|
<3> Specify the details for your environment.
|
|
|
|
|
The values here are examples.
|