码迷,mamicode.com
首页 > Web开发 > 详细

kubernetes集群新增node

时间:2018-06-08 19:30:19      阅读:431      评论:0      收藏:0      [点我收藏+]

标签:mis   pass   publickey   rem   问题   passwd   ber   iss   bsp   

kubernetes集群要新增node,首先要配置ssh免密登陆

root@ht:/etc/ansible# ssh-copy-id 172.18.196.6 
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@172.18.196.6s password: 
Permission denied, please try again.
root@172.18.196.6s password: 
Permission denied, please try again.
root@172.18.196.6s password: 
Permission denied (publickey,password).

这里出现Permission denied, please try again.出现这个问题应该是服务端SSH 服务配置了禁止root用户登录策略。

所以进入服务端172.18.196.6修改配置

/etc/ssh/sshd_config
将PermitRootLogin改成yes
#PermitRootLogin prohibit-password
PermitRootLogin yes

然后重启ssh服务

service sshd restart

如果还错误的话,也可以修改一下ssh的密码


ssh-keygen -t rsa -b 2048
passwd root

再尝试建立就可以了

 

技术分享图片

然后修改hosts文件

...
# 预留组,后续添加node节点使用
[new-node]
172.18.196.6 NODE_ID=node6 NODE_IP="172.18.196.6"
...
再运行
cd /etc/ansible && ansible-playbook 20.addnode.yml

 








kubernetes集群新增node

标签:mis   pass   publickey   rem   问题   passwd   ber   iss   bsp   

原文地址:https://www.cnblogs.com/yuxiaoba/p/9157154.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!