how to deal "failed to connect to Kubernetes master ip"

4/1/2019

I started learn Kubernetes, so I follow this guide https://kubernetes.io/docs/setup/turnkey/gce/
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

-- martin
curl
gcloud
kubernetes
macos

1 Answer

4/9/2019

Looks like GDD is only available in MacOS, about the Kubernetes logs you can have a look at this other article. If you would have a Google Kubernetes Engine cluster it would be easier to check the log by looking at Stackdriver.

-- AlbertoVI
Source: StackOverflow