在Google容器引擎中创建pod时出错

时间:2014-11-19 18:22:39

标签: google-kubernetes-engine

当我尝试在Google容器引擎中创建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]

1 个答案:

答案 0 :(得分:2)

这是因为etcd没有在kubernetes master上运行。您可以ssh到主VM并运行:

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

修复群集。

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