This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.13.2.3. 自动将机器扩展到可用的裸机主机数量
					要自动创建与可用 BareMetalHost 对象数量匹配的 Machine 对象数量,请在 MachineSet 对象中添加 metal3.io/autoscale-to-hosts 注解。
				
先决条件
- 
							安装 RHCOS 裸机计算机器以在集群中使用,并创建对应的 
BareMetalHost对象。 - 
							安装 OpenShift Container Platform CLI(
oc)。 - 
							以具有 
cluster-admin权限的用户身份登录。 
流程
通过添加
metal3.io/autoscale-to-hosts注解来注解您要配置的用于自动扩展的机器集。将<machineset>替换为机器集的名称。oc annotate machineset <machineset> -n openshift-machine-api 'metal3.io/autoscale-to-hosts=<any_value>'
$ oc annotate machineset <machineset> -n openshift-machine-api 'metal3.io/autoscale-to-hosts=<any_value>'Copy to Clipboard Copied! Toggle word wrap Toggle overflow 等待新的缩放计算机启动。
注意
						当您使用 BareMetalHost 对象在集群中创建机器时,BareMetalHost 上更改了标签或选择器,BareMetalHost 对象仍然会根据创建 Machine 对象的 MachineSet 进行计数。