OpenShift 4 开始master节点使用CoreOS作为其底层操作系统。CoreOS安装管理都是自动进行的,红帽不建议用户直接管理。不过可通过以下方法登录到CoreOS节点。
- 获得运行CRC的虚拟机IP
$ crc ip
192.168.130.11
- 用证书登录CoreOS
$ ssh -i ~/.crc/machines/crc/id_rsa core@192.168.130.11
Red Hat Enterprise Linux CoreOS 42.81.20191119.1
WARNING: Direct SSH access to machines is not recommended.
---
[systemd]
Failed Units: 1
getty@tty1.service
- 切换到root用户
[core@crc-2n9vw-master-0 ~]$ whoami
core
[core@crc-2n9vw-master-0 ~]$ sudo -i
[systemd]
Failed Units: 1
getty@tty1.service
[root@crc-2n9vw-master-0 ~] whoami
root