報錯以下:node
WARN[0000] Failed to set up SSH tunneling for host [172.20.101.167]: Can't retrieve Docker Info: error during connect: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.24/info: Unable to access the Docker socket (/var/run/docker.sock). Please check if the configured user can execute `docker ps` on the node, and if the SSH server version is at least version 6.7 or higher. If you are using RedHat/CentOS, you can't use the user `root`. Please refer to the documentation for more instructions. Error: ssh: rejected: administratively prohibited (open failed)
大體意思說:
1:Centos 系統,不能用root 執行docker 命令;
2:Sshd 服務版本不能低於 6.7;docker
建立用戶而且添加到docker組ssh
groupadd docker useradd rancher -G docker echo "123456" | passwd --stdin rancher
或者將現有的一個帳戶加入到docke組;socket
usermod ptmind -G docker
注意修改:ide
nodes: - address: 172.20.101.157 #集羣節點的地址 user: ptmind #使用哪一個用戶執行安裝命令 <=== 修改用戶