Kubespray cluster.yml - 与以下命令一起工作。
使用的命令:
ansible-playbook -b cluster.yml -i inventory/sample/hosts.ini -e kube_version=v1.13.2 -vvv
但是缩放失败并显示以下消息.. 即等待创建 kubelet.conf 文件。
(1, '\n{"msg": "Timeout when waiting for file /etc/kubernetes/kubelet.conf", "failed": true, "exception": "WARNING: The below traceback may *not* be related to the actual failure.\\n File \\"/tmp/ansible_wait_for_payload_DaSEDY/__main__.py\\", line 517, in main\\n os.stat(path)\\n", "elapsed": 600, "invocation": {"module_args": {"active_connection_states": ["ESTABLISHED", "FIN_WAIT1", "FIN_WAIT2", "SYN_RECV", "SYN_SENT", "TIME_WAIT"], "state": "started", "connect_timeout": 5, "delay": 1, "msg": null, "host": "127.0.0.1", "sleep": 1, "timeout": 600, "exclude_hosts": null, "search_regex": null, "path": "/etc/kubernetes/kubelet.conf", "port": null}}}\n', '')
<10.227.220.240> Failed to connect to the host via ssh:
The full traceback is:
WARNING: The below traceback may *not* be related to the actual failure.
File "/tmp/ansible_wait_for_payload_DaSEDY/__main__.py", line 517, in main
os.stat(path)
fatal: [cuber6]: FAILED! => {
"changed": false,
"elapsed": 600,
"invocation": {
"module_args": {
"active_connection_states": [
"ESTABLISHED",
"FIN_WAIT1",
"FIN_WAIT2",
"SYN_RECV",
"SYN_SENT",
"TIME_WAIT"
],
"connect_timeout": 5,
"delay": 1,
"exclude_hosts": null,
"host": "127.0.0.1",
"msg": null,
"path": "/etc/kubernetes/kubelet.conf",
"port": null,
"search_regex": null,
"sleep": 1,
"state": "started",
"timeout": 600
}
},
"msg": "Timeout when waiting for file /etc/kubernetes/kubelet.conf"
}
NO MORE HOSTS LEFT **********************************************************************************************************************************
to retry, use: --limit @/root/kubespray_stg/scale.retry
SSH 连接良好。
尝试增加 Time out in
/root/kubespry/roles/kubernetes/kubeadm/tasks/main.yml 文件,但没有运气。