curl: (7) failed to connection error while execute kube-up.sh

#1

I started learn Kubernetes, so I follow this guide Running Kubernetes on Google Compute Engine - Kubernetes
I got an error after I run “cluster/kube-up.sh”

Waiting up to 300 seconds for cluster initialization.

This will continually check to see if the API for kubernetes is reachable. This may time out if there was some uncaught error during start up.

.........................................................................................................................................Cluster failed to initialize within 300 seconds.

Last output from querying API server follows:

% Total % Received % Xferd Average Speed Time Time Time current
             Dload     Upload Total Spent Left speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (7) Failed to connect to "[kubernetes-master (external IP)]"

So I tried to search about this error. And then found one solution. It said go to the “cluster/gce/config-default.sh”

 secret: $(dd if=/dev/urandom iflag=fullblock bs=32 count=1 2>/dev/null | base64 | tr -d '\r\n')
And then change 'dd' to 'gdd'. So I modified config-default.sh, But it doesn't work.

I don’t know how to fix it. Is there are any solution about this error ?̊̈ Also in the /var/logs there are no logs about Kubernetes. Where logs are saved ?̊̈

My Mac version: mas OS Mojave version: 10.14.3

0 Likes

#2

I would try running the script with bash -x and see the command that fails and try to see which params is using and why it might fail.

In my experience that worked always fine, when it failed I forgot to export some env var or something like that.

0 Likes