我试图在
之后在Ubuntu 18.04上使用kvm启动Kubernetes minikube(v0.32.0)但是,它在运行时挂起:
minikube start --vm-driver kvm2 -v 10
或minikube ssh -v 10
与
Error dialing TCP: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
。
我可以使用“ ssh docker@192.168.39.98”连接到minikube VM,因此我相信minikube ssh
不起作用,因为它不使用相同的参数。我该如何配置呢?
"AuthOptions": { "CertDir": "/home/badgers/.minikube", "CaCertPath": "/home/badgers/.minikube/certs/ca.pem", "CaPrivateKeyPath": "/home/badgers/.minikube/certs/ca-key.pem", "CaCertRemotePath": "", "ServerCertPath": "/home/badgers/.minikube/machines/server.pem", "ServerKeyPath": "/home/badgers/.minikube/machines/server-key.pem", "ClientKeyPath": "/home/badgers/.minikube/certs/key.pem", "ServerCertRemotePath": "", "ServerKeyRemotePath": "", "ClientCertPath": "/home/badgers/.minikube/certs/cert.pem", "ServerCertSANs": null, "StorePath": "/home/badgers/.minikube"
答案 0 :(得分:1)
您的VM是否真的启动了?您是在裸机还是嵌套虚拟化上运行?通常,您用于连接虚拟机的ssh私钥位于以下位置:
/home/badgers/.minikube/machines/minikube/id_rsa
您可以使用以下方法进行检查:
$ minikube ssh-key
这也由您配置中的SSHKeyPath
选项标识:
{
"ConfigVersion": 3,
"Driver": {
"IPAddress": "192.168.x.x",
"MachineName": "minikube",
"SSHUser": "docker",
"SSHPort": 22,
"SSHKeyPath": "/home/badgers/.minikube/machines/minikube/id_rsa",
...
}