Error in creating pod in Google container Engine

11/19/2014

When I try to create pod in google container engine. I get below error. SSH work file to the host. But I not sure, how to configure CA or any keys. Does anybody has faced similar issue and resolved it.

I have another question. When does google is coming up with REST API for POD creation.

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]
-- Ashish Jain
google-kubernetes-engine

1 Answer

11/19/2014

This is because etcd isn't running on the kubernetes master. You can ssh into your master VM and run:

sudo salt '*' state.highstate

to have salt try and start the process again.

In this case, the problem is that Saltstack released a new version of salt (2014.7.0) which caused etcd to fail to properly install.

You can edit

/srv/salt/etcd/init.sls

and replace

tar_options: z

with

tar_options: xz

then re-run

sudo salt '*' state.highstate

to fix your cluster.

Or you can tear down your cluster and create a new cluster as the problem is no longer affecting newly created clusters.

-- Robert Bailey
Source: StackOverflow