首页 > 解决方案 > 在 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 

标签: dockerkubernetesssh

解决方案


您面临的问题很可能与 SSH 授权有关。

正如您在以下文档中看到的:

-- Mirantis.com:下载:Mirantis 云原生平台:Mirantis kubernetes 引擎


我试图复制相同的错误,并且当 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 地址是正确的)。


其他资源:


推荐阅读