docker - 在 VirtualBox 中部署 Mirantis Kubernetes Engine
问题描述
我尝试在我的 VirtualBox (ubuntu) 中部署 Mirantis Kubernetes Engine。
我制作了一个这样的yaml文件:
apiVersion: launchpad.mirantis.com/mke/v1.4
kind: mke
metadata:
name: my-mke-cluster
spec:
hosts:
- ssh:
address: 192.168.100.194
user: kub
port: 22
keyPath: ~/.ssh/id_rsa
role: manager
- ssh:
address: 192.168.100.194
user: kub
port: 22
keyPath: ~/.ssh/id_rsa
role: worker
mke:
version: 3.3.7
installFlags:
- --pod-cidr="10.0.0.0/16"
- --admin-username=admin
- --admin-password=admin
mcr:
version: 20.10.0
cluster:
prune: false
但我有问题连接 SSH 错误输出是:
FAT 在 2 台主机上失败:
[ssh] 192.168.100.194:22: All attempts fail:
#1: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
[ssh] 192.168.100.194:22: All attempts fail:
#1: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
解决方案
您面临的问题很可能与 SSH 授权有关。
正如您在以下文档中看到的:
- 必须将目标计算机配置为使用密钥而不是密码通过SSH访问,以及对管理帐户使用 sudo 进行无密码访问。这是 AWS EC2 虚拟机的标准。
我试图复制相同的错误,并且当 SSH 密钥(公共密钥)未放置在目标机器中(/home/$USER/.ssh/authorized_keys
或/root/.ssh/authorized_keys
取决于设置)时发生:
INFO ==> Running phase: Open Remote Connection
INFO See /SOME/PATH/.mirantis-launchpad/cluster/hello-cluster/apply.log for more logs
FATA failed on 2 hosts:
- [ssh] 192.168.0.123:22: All attempts fail:
#1: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
- [ssh] 192.168.0.123:22: All attempts fail:
#1: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
要解决此问题,您需要为目标计算机配置无密码登录。
进一步推进此配置过程还应该向您显示duplicate hostname
错误(假设重复的 IP 地址是正确的)。
其他资源:
推荐阅读
- javascript - 如何在 React 中返回一个可设置的常量
- java - 我在java中将csv读入数组,试图将数组的内容设置为JComboBox
- javascript - 带有验证的日期掩码
- image-processing - 由于少量误报,骰子得分极低。为什么骰子得分不考虑真底片?
- google-pay - Google Pay 是否会批准将优惠垂直用于数字认证卡?
- javascript - 单选按钮返回未定义
- android - Flutter:路由到不同的 .dart 文件失败。返回黑屏
- python - 如何将字符串转换为多级 JSON?
- javascript - 找不到缺失日期的正确索引
- c - 究竟什么才是标识符的声明?