Kubernetes OpenStack 集成

Kubernetes OpenStack integration

正在尝试进行集成,但遇到了一些问题。当 --cloudprovider=openstackkube-apiserver 使用此 message 启动后立即崩溃 所有需要的配置都通过 cloud.conf 提供并通过 --cloudconfig=/etc/cloud.conf 加载。 有没有人成功地进行了这样的设置?

错误信息:

Aug 21 15:58:00 k8s-master-01 kube-apiserver[29112]: panic: runtime error: invalid memory address or nil pointer dereference
Aug 21 15:58:00 k8s-master-01 kube-apiserver[29112]: [signal 0xb code=0x1 addr=0x0 pc=0x7f43bd]
Aug 21 15:58:00 k8s-master-01 kube-apiserver[29112]: goroutine 1 [running]:
Aug 21 15:58:00 k8s-master-01 kube-apiserver[29112]: k8s.io/kubernetes/pkg/cloudprovider/providers/openstack.(*OpenStack).Instances(0x0, 0x0, 0x0, 0x6)
Aug 21 15:58:00 k8s-master-01 kube-apiserver[29112]: /builddir/build/BUILD/kubernetes-b5a4a548df0cffb99bdcc3b9b9e48d4025d0541c/_output/local/go/src/k8s.io/kubernetes/pkg/cloudprovider/providers/openstack/openstack.go:163 +0x8ed
Aug 21 15:58:00 k8s-master-01 kube-apiserver[29112]: k8s.io/kubernetes/cmd/kube-apiserver/app.(*APIServer).Run(0xc82029b500, 0xc8202b6400, 0x0, 0x10, 0x0, 0x0)
Aug 21 15:58:00 k8s-master-01 kube-apiserver[29112]: /builddir/build/BUILD/kubernetes-b5a4a548df0cffb99bdcc3b9b9e48d4025d0541c/_output/local/go/src/k8s.io/kubernetes/cmd/kube-apiserver/app/server.go:384 +0x1439
Aug 21 15:58:00 k8s-master-01 kube-apiserver[29112]: main.main()
Aug 21 15:58:00 k8s-master-01 kube-apiserver[29112]: /builddir/build/BUILD/kubernetes-b5a4a548df0cffb99bdcc3b9b9e48d4025d0541c/_output/local/go/src/k8s.io/kubernetes/cmd/kube-apiserver/apiserver.go:48 +0x171
Aug 21 15:58:00 k8s-master-01 kube-apiserver[29112]: goroutine 17 [chan receive]:
Aug 21 15:58:00 k8s-master-01 kube-apiserver[29112]: github.com/golang/glog.(*loggingT).flushDaemon(0x1d27440)
Aug 21 15:58:00 k8s-master-01 kube-apiserver[29112]: /builddir/build/BUILD/kubernetes-b5a4a548df0cffb99bdcc3b9b9e48d4025d0541c/Godeps/_workspace/src/github.com/golang/glog/glog.go:879 +0x67
Aug 21 15:58:00 k8s-master-01 kube-apiserver[29112]: created by github.com/golang/glog.init.1
Aug 21 15:58:00 k8s-master-01 kube-apiserver[29112]: /builddir/build/BUILD/kubernetes-b5a4a548df0cffb99bdcc3b9b9e48d4025d0541c/Godeps/_workspace/src/github.com/golang/glog/glog.go:410 +0x297
Aug 21 15:58:00 k8s-master-01 kube-apiserver[29112]: goroutine 24 [syscall]:
Aug 21 15:58:00 k8s-master-01 kube-apiserver[29112]: os/signal.loop()
Aug 21 15:58:00 k8s-master-01 kube-apiserver[29112]: /usr/lib/golang/src/os/signal/signal_unix.go:22 +0x18
Aug 21 15:58:00 k8s-master-01 kube-apiserver[29112]: created by os/signal.init.1
Aug 21 15:58:00 k8s-master-01 kube-apiserver[29112]: /usr/lib/golang/src/os/signal/signal_unix.go:28 +0x37
Aug 21 15:58:00 k8s-master-01 kube-apiserver[29112]: goroutine 26 [runnable]:

/etc/cloud.conf

[Global]
auth-url = OS_AUTH_URL
user-id = OS_USERNAME
api-key = OS_PASSWORD
tenant-id = OS_TENANT_ID
tenant-name = OS_TENANT_NAME
[LoadBalancer]
subnet-id = 11111111-1111-1111-1111-111111111111

你能把你的 cloud.conf 粘贴到这里吗?看起来你的 openstack 云没有被实例化。

好的,region在强制选项中。当它为空时,代码将失败。您必须指定它,即使您的 OpenStack 不使用区域。最大的问题是代码本身不检查用户指定的参数,因此无法告知您做错了什么。