无法验证ip的证书,因为它不包含任何IP SAN

时间:2015-09-28 12:40:02

标签: ssl docker kubernetes openshift-origin

我已经使用Docker和Kubernetes安装了OpenShift3和ansible安装程序。 安装后我想在我的主人上创建我的docker注册但是我得到以下错误(我读的是SSL的东西,但我找不到解决方案): 命令(来自样本):

[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 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

其他信息

[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

1 个答案:

答案 0 :(得分:1)

Ansible安装程序为您在证书中拥有正确IP的证书生成证书。您的本地kubeconfig文件(该oadm用于连接服务器)应该由Ansible安装程序生成 - 您能验证是否是这种情况?该文件位于〜/ .kube / config中 - 是否指向Ansible安装程序使用的系统?您是使用IaaS for OpenShift,部署到本地计算机还是Vagrant?