0

Kubespray cluster.yml - works fine with the below command.

command used:

ansible-playbook -b cluster.yml -i inventory/sample/hosts.ini -e kube_version=v1.13.2 -vvv

But scaling fails with below message .. ie waiting for kubelet.conf file to create.

(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 connectivity is good.

Tried increasing Time out in

/root/kubespry/roles/kubernetes/kubeadm/tasks/main.yml file but no luck.

mdaniel
  • 31,240
  • 5
  • 55
  • 58
saikrishna
  • 11
  • 3
  • SCALING MASTER HAS PROBLEM BUT SCALING NODE WORKS FINE. – saikrishna Feb 16 '19 at 11:26
  • Hi saikrishna, welcome to SO. Without more information from the log files, we cannot possibly hope to troubleshoot something as complex as scaling a kubernetes cluster using ansible. It is very likely that the kubelet is not starting correctly on the new Node, so try looking in its `journalctl -u kubelet.service` or equivalent for errors – mdaniel Feb 17 '19 at 01:53
  • 1
    Thanks for your reply. To scale up master node we need use cluster.yml and to scale worker nodes we need to run scale.yml. With out disturbing exisiting setup add only new certificates by passing --limit node name or -l node when executing ansible commands. More details available in https://github.com/kubernetes-sigs/kubespray/issues/1122 – saikrishna Feb 17 '19 at 09:13

0 Answers0