Not able to connect to cluster. Facing Certificate signed by unknown authority

10/18/2014

I am not sure either what I am trying to do is possible or correct way.

One of my colleague spinup kubernetes gce cluster (with 1 master and 4 minions.) in a project which is shared with me as owner access.

After setup he shared his ~/.kubernetes_auth keys along with .kubecfg.crt, .kubecfg.ca.crt and .kubecfg.key. I copied all of the at my home folder and setup the kubernetes workspace. I also set the project name as a default project in geconfig. and now I can connect to the master and slaves using 'gcutil ssh --zone us-central1-b kubernetes-master'

But when I try to list of existing pods using 'cluster/kubecfg.sh list pods' I see

"F1017 21:05:31.037148 18021 kubecfg.go:422] Got request error: Get https://107.178.208.109/api/v1beta1/pods?namespace=default: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "ChangeMe")

I tried to debug from my side but failed to come any conclusion. Any sort of clue will be helpful.

-- Atish Narlawar
kubernetes

3 Answers

10/19/2014

I figured out a workaround: set the -insecure_skip_tls_verify option

In kubecfg.sh, change the code near the bottom to

else
  auth_config=(
    "-insecure_skip_tls_verify"
  )
fi

Obviously this is insecure and you are putting yourself at risk of a man in the middle attack, etc.

-- Greg Weber
Source: StackOverflow

10/23/2014

You can also copy the cert files off of the master again. They are located in /usr/share/nginx on the master.

-- brendan
Source: StackOverflow

12/4/2014

It is probably due to a not implemented feature, see this issue: https://github.com/GoogleCloudPlatform/kubernetes/issues/1886

you can copy the files from /usr/share/nginx/... on the master into your home dir and try again.

-- Akram Ben Aissi
Source: StackOverflow