1.报错信息
[root@k8s_master kubesphere-3.4.1-1.23.15-offline-package]# ./kk init registry -f config-sample.yaml -a kubesphere.tar.gz
_ __ _ _ __
| | / / | | | | / /
| |/ / _ _| |__ ___| |/ / ___ _ _
| \| | | | '_ \ / _ \ \ / _ \ | | |
| |\ \ |_| | |_) | __/ |\ \ __/ |_| |
\_| \_/\__,_|_.__/ \___\_| \_/\___|\__, |
__/ |
|___/
22:12:31 CST [GreetingsModule] Greetings
22:12:37 CST failed: [k8s_node02]
22:12:37 CST failed: [k8s_master]
22:12:37 CST failed: [k8s_node01]
error: Pipeline[InitRegistryPipeline] execute failed: Module[GreetingsModule] exec failed:
failed: [k8s_node02] failed to connect to 192.168.137.102: could not establish connection to 192.168.137.102:22: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain
failed: [k8s_master] failed to connect to 192.168.137.100: could not establish connection to 192.168.137.100:22: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain
failed: [k8s_node01] failed to connect to 192.168.137.101: could not establish connection to 192.168.137.101:22: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain
2.解决方案
根据清单manifest下载好kubesphere.tar.gz之后,在执行"./kk init registry -f config-sample.yaml -a kubesphere.tar.gz"命令时,老报上面的错,查了半天,发现把机器的密码写错了,尴尬,记录一下,防止以后忘了。
config-sample.yaml的内容如下:
apiVersion: kubekey.kubesphere.io/v1alpha2
kind: Cluster
metadata:
name: sample
spec:
hosts:
#这里的user和password一定要写正确,是你的机器的用户名密码
- {name: k8s_master, address: 192.168.127.100, internalAddress: 192.168.127.100, user: root, password: "root"}
- {name: k8s_node01, address: 192.168.127.101, internalAddress: 192.168.127.101, user: root, password: "root"}
- {name: k8s_node02, address: 192.168.127.102, internalAddress: 192.168.127.102, user: root, password: "root"}
roleGroups:
etcd:
- k8s_master
control-plane:
- k8s_master
worker:
- k8s_node01
- k8s_node02
controlPlaneEndpoint:
## Internal loadbalancer for apiservers
# internalLoadbalancer: haproxy
domain: lb.kubesphere.local
address: "10.192.52.93"
port: 6443
kubernetes:
version: --with-kubesphere
clusterName: cluster.local
autoRenewCerts: true
containerManager:
etcd:
type: kubekey
network:
plugin: calico
kubePodsCIDR: 10.233.64.0/18
kubeServiceCIDR: 10.233.0.0/18
## multus support. https://github.com/k8snetworkplumbingwg/multus-cni
multusCNI:
enabled: false
registry:
#这里确认先搭建好harbor私服
type: harbor
auths:
"192.168.127.103:8090":
username: admin
password: Harbor12345
privateRegistry: "192.168.127.103:8090"
namespaceOverride: ""
registryMirrors: []
insecureRegistries: []
addons: []
标签:__,22,192.168,failed,ssh,k8s
From: https://www.cnblogs.com/hujunwei/p/18214419