hoeghh / kubernetes_the_easy_way

Automating Kubernetes the hard way with Vagrant and scripts
MIT License
20 stars 11 forks source link

no route to host #33

Closed vikasgubbi closed 6 years ago

vikasgubbi commented 6 years ago

Hi,

Getting below message, firewall is disabled in host machine

docker@node2:~/kubernetes_the_easy_way$ kubectl get nodes Unable to connect to the server: dial tcp 192.168.50.20:6443: getsockopt: no route to host

Regards,Vikas

hoeghh commented 6 years ago

Please paste the content of the file logs/vagrant-provition.log and your config

vikasgubbi commented 6 years ago

Hi,

config file

docker@node2:~/kubernetes_the_easy_way$ more config export ETCD_COUNT=1 export ETCD_CPU=1 export ETCD_MEM=512 export MASTER_COUNT=1 export MASTER_CPU=1 export MASTER_MEM=512 export WORKER_COUNT=2 export WORKER_CPU=1 export WORKER_MEM=512 export LOADBALANCER_COUNT=1 export LOADBALANCER_CPU=1 export LOADBALANCER_MEM=512

export EXTRA_HOSTS="

Add extra hosts entries to each node in the format of

192.168.1.148 nfs-server.example.com

vagrant.log

__Etcd ___ | - Nodes : 1 | - CPU : 1 | - Memory : 512

Masters __ | - Nodes : 1 | - CPU : 1 | - Memory : 512

Workers __ | - Nodes : 2 | - CPU : 1 | - Memory : 512

Loadbalancers | - Nodes : 1 | - CPU : 1 | - Memory : 512

Bringing machine 'k8s-etcd-1' up with 'virtualbox' provider... Bringing machine 'k8s-master-1' up with 'virtualbox' provider... Bringing machine 'k8s-worker-1' up with 'virtualbox' provider... Bringing machine 'k8s-worker-2' up with 'virtualbox' provider... Bringing machine 'k8s-loadbalancer-1' up with 'virtualbox' provider... ==> k8s-etcd-1: Checking if box 'bento/fedora-27' is up to date... ==> k8s-etcd-1: VirtualBox VM is already running. ==> k8s-master-1: Checking if box 'bento/fedora-27' is up to date... ==> k8s-master-1: VirtualBox VM is already running. ==> k8s-worker-1: Checking if box 'bento/fedora-27' is up to date... ==> k8s-worker-1: VirtualBox VM is already running. ==> k8s-worker-2: Checking if box 'bento/fedora-27' is up to date... ==> k8s-worker-2: VirtualBox VM is already running. ==> k8s-loadbalancer-1: Checking if box 'bento/fedora-27' is up to date... ==> k8s-loadbalancer-1: VirtualBox VM is already running.

Regards,Vikas

hoeghh commented 6 years ago

It looks like you have run the install script while the virtual machines were already running. This means that all log from when they were created is overwritten.

Run the destroy script, and the the install script.

And, I would give the workers a bit more memory in the config file.

Try that and post the log if it doesn't work.

hoeghh commented 6 years ago

@vikasgubbi did it work?

vikasgubbi commented 6 years ago

Hi, install.sh script got struck at below message for more than 30 min,cancelled it and reran the script it went to success but when i did kubectl get nodes ,it errored out to no route to host.

regards,Vikas


==> k8s-loadbalancer-1: Digest: sha256:eb8eb1d83fc58716b20621d397d63737a18f86cbed1fedb1d71671cfc486517b ==> k8s-loadbalancer-1: Status: Downloaded newer image for weaveworks/weaveexec:2.3.0 ==> k8s-loadbalancer-1: 08a2da4803cbb0da6cf51cd88147e948a1e7415cba226fb9de52a1d36492845e

hoeghh commented 6 years ago

You cannot rerun the install script. You need to run the destroy script first, always.

it looks like it doesnt get past the weavenet container. I will see if i can find a way to debug it, and then get back to you

vikasgubbi commented 6 years ago

Hi, can you share your email id, if possible please.

Regards,Vikas

hoeghh commented 6 years ago

Did you get it to work?

vikasgubbi commented 6 years ago

yes