1

当我尝试在谷歌容器引擎中创建 pod 时。我得到以下错误。SSH 工作文件到主机。但我不确定如何配置 CA 或任何密钥。有没有人遇到过类似的问题并解决了。

我有另一个问题。谷歌什么时候会提出用于创建 POD 的 REST API。

gcloud  --verbosity=debug preview container pods --cluster-name docker-test create my-redis --zone asia-east1-a --image docker/redis --port 9000
INFO: Refreshing access_token
DEBUG: Running gcloud.preview.container.pods.create with _Args({'api_version': 'v1beta1',
 'cluster_name': 'docker-test',
 'config_file': None,
 'format': None,
 'h': None,
 'help': None,
 'image': 'docker/redis',
 'markdown': None,
 'name': 'my-redis',
 'port': '9000',
 'project': None,
 'purge_config_cache': False,
 'quiet': None,
 'shell': None,
 'skip_certificate_fetch': False,
 'user_output_enabled': None,
 'verbosity': 'debug',
 'zone': 'asia-east1-a'}).
DEBUG: Loading cluster config from /home/ashish/.config/gcloud/kubernetes/fabled-ruler-762.asia-east1-a.docker-test/cluster.json
DEBUG: Checking kubernetes auth file /home/ashish/.config/gcloud/kubernetes/fabled-ruler-762.asia-east1-a.docker-test/kubernetes_auth
DEBUG: Checking kubernetes cert files CertFiles(certificate_authority='/home/ashish/.config/gcloud/kubernetes/fabled-ruler-762.asia-east1-a.docker-test/ca.crt', client_certificate='/home/ashish/.config/gcloud/kubernetes/fabled-ruler-762.asia-east1-a.docker-test/kubecfg.crt', client_key='/home/ashish/.config/gcloud/kubernetes/fabled-ruler-762.asia-east1-a.docker-test/kubecfg.key')
DEBUG: Calling 'kubecfg -h https://104.155.xxx.xxx -auth /home/ashish/.config/gcloud/kubernetes/fabled-ruler-762.asia-east1-a.docker-test/kubernetes_auth -certificate_authority=/home/ashish/.config/gcloud/kubernetes/fabled-ruler-762.asia-east1-a.docker-test/ca.crt -client_key=/home/ashish/.config/gcloud/kubernetes/fabled-ruler-762.asia-east1-a.docker-test/kubecfg.key -client_certificate=/home/ashish/.config/gcloud/kubernetes/fabled-ruler-762.asia-east1-a.docker-test/kubecfg.crt -c /tmp/tmpjCQaCR create pods'
DEBUG: kubecfg command ['kubecfg', '-h', u'https://104.155.xxx.xxx', '-auth', '/home/ashish/.config/gcloud/kubernetes/fabled-ruler-762.asia-east1-a.docker-test/kubernetes_auth', '-certificate_authority=/home/ashish/.config/gcloud/kubernetes/fabled-ruler-762.asia-east1-a.docker-test/ca.crt', '-client_key=/home/ashish/.config/gcloud/kubernetes/fabled-ruler-762.asia-east1-a.docker-test/kubecfg.key', '-client_certificate=/home/ashish/.config/gcloud/kubernetes/fabled-ruler-762.asia-east1-a.docker-test/kubecfg.crt', '-c', '/tmp/tmpjCQaCR', 'create', 'pods'] returned non-zero exit status 255

ERROR: F1119 23:49:13.721582 03243 kubecfg.go:403] Got request error: 501: All the given peers are not reachable (Tried to connect to each peer twice and failed) [0]
4

1 回答 1

2

这是因为 etcd 没有在 kubernetes master 上运行。您可以 ssh 进入您的主虚拟机并运行:

sudo salt '*' state.highstate

尝试加盐并重新开始该过程。

在这种情况下,问题是 Saltstack 发布了新版本的 salt (2014.7.0),导致 etcd 无法正确安装。

你可以编辑

/srv/salt/etcd/init.sls

并更换

tar_options: z

tar_options: xz

然后重新运行

sudo salt '*' state.highstate

修复您的集群。

或者您可以拆除集群并创建一个新集群,因为问题不再影响新创建的集群。

于 2014-11-19T19:53:42.357 回答