|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * machine_management/cluster_api_machine_management/cluster_api_provider_configurations/cluster-api-config-options-bare-metal.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: REFERENCE |
| 6 | +[id="capi-yaml-machine-set-bare-metal_{context}"] |
| 7 | += Sample YAML for a Cluster API compute machine set resource on bare metal |
| 8 | + |
| 9 | +The compute machine set resource defines additional properties of the machines that it creates. |
| 10 | +The compute machine set also references the cluster resource and machine template when creating machines. |
| 11 | + |
| 12 | +[source,yaml] |
| 13 | +---- |
| 14 | +apiVersion: cluster.x-k8s.io/v1 |
| 15 | +kind: MachineSet |
| 16 | +metadata: |
| 17 | + name: <machine_set_name> # <1> |
| 18 | + namespace: openshift-cluster-api |
| 19 | + labels: |
| 20 | + cluster.x-k8s.io/cluster-name: <cluster_name> # <2> |
| 21 | +spec: |
| 22 | + clusterName: <cluster_name> |
| 23 | + replicas: 1 |
| 24 | + selector: |
| 25 | + matchLabels: |
| 26 | + test: example |
| 27 | + cluster.x-k8s.io/cluster-name: <cluster_name> |
| 28 | + cluster.x-k8s.io/set-name: <machine_set_name> |
| 29 | + template: |
| 30 | + metadata: |
| 31 | + labels: |
| 32 | + test: example |
| 33 | + cluster.x-k8s.io/cluster-name: <cluster_name> |
| 34 | + cluster.x-k8s.io/set-name: <machine_set_name> |
| 35 | + node-role.kubernetes.io/<role>: "" |
| 36 | + spec: |
| 37 | + bootstrap: |
| 38 | + dataSecretName: worker-user-data |
| 39 | + clusterName: <cluster_name> |
| 40 | + infrastructureRef: |
| 41 | + apiVersion: infrastructure.cluster.x-k8s.io/v1 |
| 42 | + kind: Metal3MachineTemplate # <3> |
| 43 | + name: <template_name> # <4> |
| 44 | +---- |
| 45 | +<1> Specify a name for the compute machine set. |
| 46 | +The cluster ID, machine role, and region form a typical pattern for this value in the following format: `<cluster_name>-<role>-<region>`. |
| 47 | +<2> Specify the cluster ID as the name of the cluster. |
| 48 | +<3> Specify the machine template kind. |
| 49 | +This value must match the value for your platform. |
| 50 | +<4> Specify the machine template name. |
0 commit comments