使用kubespray scale.yml缩放失败“无法通过ssh连接主机”

时间:2019-02-16 07:58:26

标签: kubernetes kubespray

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连接良好。

尝试增加

的超时时间

/root/kubespry/roles/kubernetes/kubeadm/tasks/main.yml文件,但是没有运气。

0 个答案:

没有答案