Cannot validate certificate for ip because it doesn't contain any IP SANs

9/28/2015

I have installed OpenShift3 with Docker and Kubernetes with the ansible installer. After the installation I want to create my docker registration on my master but I get the following error (I read it was something with SSL but I can't find a solution): commands (from the sample):

[root@ip-10-0-0-x centos]# export CURL_CA_BUNDLE=`pwd`/openshift.local.config/master/ca.crt
[root@ip-10-0-0-x centos]# sudo chmod a+rwX openshift.local.config/master/admin.kubeconfig
[root@ip-10-0-0-x centos]# sudo chmod +r openshift.local.config/master/openshift-registry.kubeconfig
[root@ip-10-0-0-x centos]# oadm registry --create --credentials=openshift.local.config/master/openshift-registry.kubeconfig --config=openshift.local.config/master/admin.kubeconfig

error:

error: error getting client: couldn't read version from server: Get https://10.0.0.x:8443/api: x509: cannot validate certificate for 10.0.0.x because it doesn't contain any IP SANs

additional info

[root@ip-10-0-0-x centos]# kubectl version
Client Version: version.Info{Major:"", Minor:"", GitVersion:"v1.1.0-alpha.0-1605-g44c91b1", GitCommit:"44c91b1", GitTreeState:"not a git tree"}
Server Version: version.Info{Major:"", Minor:"", GitVersion:"v1.1.0-alpha.0-1605-g44c91b1", GitCommit:"44c91b1", GitTreeState:"not a git tree"}

[root@ip-10-0-0-191 centos]# oc get services
NAME         CLUSTER_IP   EXTERNAL_IP   PORT(S)   SELECTOR   AGE
kubernetes   172.30.0.1   <none>        443/TCP   <none>     1d

[root@ip-10-0-0-x centos]# kubernetes apiserver
F0924 12:15:13.674745   75545 server.go:223] No --service-cluster-ip-range specified
-- lvthillo
docker
kubernetes
openshift-origin
ssl

1 Answer

9/29/2015

The Ansible installer should generate certs for you that have the right IPs in the certs. Your local kubeconfig file (that oadm is using to connect to the server) should have been generated by the Ansible installer - can you verify that is the case? The file is in ~/.kube/config - does it point to the system that the Ansible installer used? Are you using an IaaS for OpenShift, deploying to local machines, or Vagrant?

-- Clayton
Source: StackOverflow