ansible-kubeadm-cluster icon indicating copy to clipboard operation
ansible-kubeadm-cluster copied to clipboard

Code hangs on "Join nodes to cluster"

Open bostone opened this issue 7 years ago • 3 comments

Hello there,

Tried this on CentOS 7 1 master, 2 minions and got stuck at "Join nodes to cluster". I'm not sure where in your code you intend to provide username/pwd to access master and minions so I set my inventory file like this:

[cluster]

[cluster:children]
master
nodes
#
# The cluster group contains two subgroups: master and nodes
#

[cluster:vars]
cluster_name=pbench_cluster
#
# cluster_name is used to store and retrieve the admission_token
#

[master]
sdl02269.labs.foo.com ansible_user=pbench ansible_ssh_pass=fakepass!
#
# The master group should have only ONE FQDN defined/specified
#

[master:vars] 
# master_ip_address_configured=1.2.3.4
# If you need to specify a specific ip address for the master, uncomment the above and edit

[nodes]
sdl02918.labs.foo.com ansible_user=pbench ansible_ssh_pass=fakepass!
sdl03105.labs.foo.com ansible_user=pbench ansible_ssh_pass=fakepass!
#
# FQDNs of hosts assigned the Kubernetes cluster node role
#

[nodes:vars]

It was pretty obvious after about 40 min that ansible script will not proceed so I had to terminate it. Running "kubectl get nodes" only shows master and I do see k8s and docker installed on minions.

I am running a playbook on yet another VM that is not part of k8s cluster. Previously I was able to perform installation manually following same tutorial on which your code is built

pbench user on all machines in cluster is configured for passwordless access and has sudo NOPASS WD setup

Thanks, Bo Stone

bostone avatar Mar 17 '17 20:03 bostone

Any words of wisdom?

bostone avatar Mar 20 '17 17:03 bostone

Sorry for the slow response. I do not understand why you need to provide any username/password, for the master and nodes, in my environment, I can ssh into these machines with no user/password. However, if you need that, your solution above ought to work....you could set the user/pass on the cluster itself instead of both on the master and nodes if they are in fact the same....

I am not sure from your comment where exactly the playbook hung for you. With the release of Kubernetes 1.6 and Kubeadm 1.6 there have been a lot of hanging issues. I released an updated version of my playbooks today that contains fixes/workarounds for Ubuntu 16.04, but I have never gotten my playbook to work with CentOS 7, so I would not be surprised if there are issues there....

dcj avatar Apr 01 '17 01:04 dcj

It's totally broken and I can't even roll back because they completely removed old kubeadm rpms

bostone avatar Apr 01 '17 02:04 bostone