3.13. 为 bootstrap 虚拟机分配静态 IP 地址
如果要在 baremetal
网络中在没有 DHCP 服务器的情况下部署 OpenShift Container Platform,则必须使用 Ignition 为 bootstrap 虚拟机配置静态 IP 地址。
流程
创建 ignition 配置文件:
./openshift-baremetal-install --dir <cluster_configs> create ignition-configs
$ ./openshift-baremetal-install --dir <cluster_configs> create ignition-configs
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 将
<cluster_configs>
替换为集群配置文件的路径。创建
bootstrap_config.sh
文件:Copy to Clipboard Copied! Toggle word wrap Toggle overflow 将
<ip_address>
和<cidr>
替换为地址范围的 IP 地址和 CIDR。使用baremetal
网络上的网关的 IP 地址替换<gateway_ip_address>
。将<dns_ip_address>
替换为baremetal
网络上的 DNS 服务器的 IP 地址。将<cluster_configs>
替换为集群配置文件的路径。使
bootstrap_config.sh
文件可执行:chmod 755 bootstrap_config.sh
$ chmod 755 bootstrap_config.sh
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 运行
bootstrap_config.sh
脚本来创建bootstrap_network_config.ign
文件:./bootstrap_config.sh
$ ./bootstrap_config.sh
Copy to Clipboard Copied! Toggle word wrap Toggle overflow