13.3.19. 创建 bootstrap 机器

您可以通过运行 bootstrap.yml playbook 创建 bootstrap 机器。此 playbook 启动 bootstrap 虚拟机,并从 asset 目录中传递 bootstrap.ign Ignition 文件。bootstrap 节点配置自己,使其能为 control plane 节点提供 Ignition 文件。

要监控 bootstrap 过程,您可以使用 RHV 管理门户中的控制台或使用 SSH 连接到虚拟机。

流程

  1. 创建 bootstrap 机器:

    $ ansible-playbook -i inventory.yml bootstrap.yml
  2. 使用管理入口或 SSH 中的控制台连接到 bootstrap 机器。将 <bootstrap_ip> 替换为 bootstrap 节点的 IP 地址。要使用 SSH,请输入:

    $ ssh core@<boostrap.ip>
  3. 从 bootstrap 节点收集发行镜像服务的 bootkube.service journald 单元日志:

    [core@ocp4-lk6b4-bootstrap ~]$ journalctl -b -f -u release-image.service -u bootkube.service
    注意

    bootstrap 节点上的 bootkube.service 日志会输出 etcd connection refused 错误,这表示 bootstrap 服务器无法在 control plane 节点(也称为 master 节点)上连接到 etcd。在各个 control plane 节点上启动 etcd 且节点已加入集群后,这个错误应该会停止。