1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/capi-yaml-machine-template-gcp.adoc
2024-06-13 18:53:17 +00:00

42 lines
1.5 KiB
Plaintext

// Module included in the following assemblies:
//
// * machine_management/cluster_api_machine_management/cluster_api_provider_configurations/cluster-api-config-options-gcp.adoc
:_mod-docs-content-type: REFERENCE
[id="capi-yaml-machine-template-gcp_{context}"]
= Sample YAML for a Cluster API machine template resource on {gcp-full}
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.
[source,yaml]
----
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: GCPMachineTemplate # <1>
metadata:
name: <template_name> # <2>
namespace: openshift-cluster-api
spec:
template:
spec: # <3>
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
----
<1> Specify the machine template kind.
This value must match the value for your platform.
<2> Specify a name for the machine template.
<3> Specify the details for your environment.
The values here are examples.