Starting Kubernetes cluster gives error: "ERROR: (gcloud.compute.instance-groups.managed.list-instances) wrong collection"

8/24/2017

Following the Kubernetes/Twitter/PubSub/BigQuery example here.

When trying to bring up the cluster, I keep getting the following error:

ERROR: (gcloud.compute.instance-groups.managed.list-instances) wrong collection: expected [compute.regionInstanceGroupManagers,compute.instanceGroupManagers], got [compute.instanceGroups], for path [https://www.googleapis.com/compute/v1/projects//zones/us-central1-b/instanceGroups/kubernetes-minion-group]

I've no idea where this error is coming from. Can someone point me in the right direction?

Full output:

Grahams-MacBook-Pro:kubernetes-bigquery-python-v2-master polleyg$ kubernetes/cluster/kube-up.sh
... Starting cluster in us-central1-b using provider gce
... calling verify-prereqs
... calling verify-kube-binaries
... calling kube-up
Project: <redacted>
Zone: us-central1-b
+++ Staging server tars to Google Storage: gs://kubernetes-staging-1e59b6b650/kubernetes-devel
+++ kubernetes-server-linux-amd64.tar.gz uploaded (sha1 = 55eb9756ac1a4d69b26b92560c0431737209967f)
+++ kubernetes-salt.tar.gz uploaded (sha1 = 10a9677905cae84aac42976aac3a850abb0ba1ec)
+++ kubernetes-manifests.tar.gz uploaded (sha1 = 2ea32f533a092ef2121107737e7c972b14fe8b0f)
WARNING: Flag --zones is deprecated. Use --filter="zone:( ZONE ... )" instead.
For example --filter="zone:( europe-west1-b europe-west1-c )".
WARNING: Flag --regexp is deprecated. Use --filter="name~'REGEXP'" instead.
INSTANCE_GROUPS=
NODE_NAMES=
Looking for already existing resources
WARNING: Flag --zones is deprecated. Use --filter="zone:( ZONE ... )" instead.
For example --filter="zone:( europe-west1-b europe-west1-c )".
WARNING: Flag --regexp is deprecated. Use --filter="name~'REGEXP'" instead.
WARNING: Flag --regexp is deprecated. Use --filter="name~'REGEXP'" instead.
Starting master and configuring firewalls
Creating firewall...
Creating firewall...
............Created [https://www.googleapis.com/compute/v1/projects/<redacted>/zones/us-central1-b/disks/kubernetes-master-pd].
NAME                  ZONE           SIZE_GB  TYPE    STATUS
kubernetes-master-pd  us-central1-b  20       pd-ssd  READY

New disks are unformatted. You must format and mount a disk before it
can be used. You can find instructions on how to do this at:

https://cloud.google.com/compute/docs/disks/add-persistent-disk#formatting

..Creating firewall...
.................Created [https://www.googleapis.com/compute/v1/projects/<redacted>/regions/us-central1/addresses/kubernetes-master-ip].
.........Generating certs for alternate-names: IP:108.59.86.10,IP:10.0.0.1,DNS:kubernetes,DNS:kubernetes.default,DNS:kubernetes.default.svc,DNS:kubernetes.default.svc.cluster.local,DNS:kubernetes-master
......Created [https://www.googleapis.com/compute/v1/projects/<redacted>/global/firewalls/kubernetes-master-https].
Created [https://www.googleapis.com/compute/v1/projects/<redacted>/global/firewalls/default-default-ssh].
done.
NAME                     NETWORK  DIRECTION  PRIORITY  ALLOW    DENY
kubernetes-master-https  default  INGRESS    1000      tcp:443
..done.
NAME                 NETWORK  DIRECTION  PRIORITY  ALLOW   DENY
default-default-ssh  default  INGRESS    1000      tcp:22
.Created [https://www.googleapis.com/compute/v1/projects/<redacted>/global/firewalls/kubernetes-master-etcd].
.done.
NAME                    NETWORK  DIRECTION  PRIORITY  ALLOW              DENY
kubernetes-master-etcd  default  INGRESS    1000      tcp:2380,tcp:2381
/var/folders/s6/r58y6c514zx5gp_f8gjkzwdh0000gn/T/kubernetes.XXXXXX.6pcvMs0R/cfssl ~/Projects/other/kubernetes-bigquery-python-v2-master
~/Projects/other/kubernetes-bigquery-python-v2-master
/var/folders/s6/r58y6c514zx5gp_f8gjkzwdh0000gn/T/kubernetes.XXXXXX.6pcvMs0R/cfssl ~/Projects/other/kubernetes-bigquery-python-v2-master
2017/08/24 20:34:48 [INFO] generating a new CA key and certificate from CSR
2017/08/24 20:34:48 [INFO] generate received request
2017/08/24 20:34:48 [INFO] received CSR
2017/08/24 20:34:48 [INFO] generating key: ecdsa-256
2017/08/24 20:34:48 [INFO] encoded CSR
2017/08/24 20:34:48 [INFO] signed certificate with serial number 2376049422328..
2017/08/24 20:34:48 [INFO] generate received request
2017/08/24 20:34:48 [INFO] received CSR
2017/08/24 20:34:48 [INFO] generating key: ecdsa-256
2017/08/24 20:34:48 [INFO] encoded CSR
2017/08/24 20:34:48 [INFO] signed certificate with serial number 518224440976..
~/Projects/other/kubernetes-bigquery-python-v2-master
+++ Logging using Fluentd to gcp
Creating firewall...
WARNING: You have selected a disk size of under [200GB]. This may result in poor I/O performance. For more information, see: https://developers.google.com/compute/docs/disks#performance.
..................Created [https://www.googleapis.com/compute/v1/projects/<redacted>/global/firewalls/kubernetes-minion-all].
done.
NAME                   NETWORK  DIRECTION  PRIORITY  ALLOW                     DENY
kubernetes-minion-all  default  INGRESS    1000      tcp,udp,icmp,esp,ah,sctp
Created [https://www.googleapis.com/compute/v1/projects/<redacted>/zones/us-central1-b/instances/kubernetes-master].
NAME               ZONE           MACHINE_TYPE   PREEMPTIBLE  INTERNAL_IP  EXTERNAL_IP   STATUS
kubernetes-master  us-central1-b  n1-standard-1               <redacted>   <redacted>  RUNNING
Creating minions.
Attempt 1 to create kubernetes-minion-template
WARNING: You have selected a disk size of under [200GB]. This may result in poor I/O performance. For more information, see: https://developers.google.com/compute/docs/disks#performance.
Created [https://www.googleapis.com/compute/v1/projects/<redacted>/global/instanceTemplates/kubernetes-minion-template].
NAME                        MACHINE_TYPE   PREEMPTIBLE  CREATION_TIMESTAMP
kubernetes-minion-template  n1-standard-2               2017-08-24T03:35:20.504-07:00
Created [https://www.googleapis.com/compute/v1/projects/<redacted>/zones/us-central1-b/instanceGroupManagers/kubernetes-minion-group].
NAME                     LOCATION       SCOPE  BASE_INSTANCE_NAME       SIZE  TARGET_SIZE  INSTANCE_TEMPLATE           AUTOSCALED
kubernetes-minion-group  us-central1-b  zone   kubernetes-minion-group  0     3            kubernetes-minion-template  no
Waiting for group to become stable, current operations: creating: 3
Group is stable
WARNING: Flag --zones is deprecated. Use --filter="zone:( ZONE ... )" instead.
For example --filter="zone:( europe-west1-b europe-west1-c )".
WARNING: Flag --regexp is deprecated. Use --filter="name~'REGEXP'" instead.
ERROR: (gcloud.compute.instance-groups.managed.list-instances) wrong collection: expected [compute.regionInstanceGroupManagers,compute.instanceGroupManagers], got [compute.instanceGroups], for path [https://www.googleapis.com/compute/v1/projects/<redacted>/zones/us-central1-b/instanceGroups/kubernetes-minion-group]
-- Graham Polley
kubectl
kubernetes

1 Answer

8/31/2017

You have a version skew problem after updating gcloud. You need to downgrade gcloud to version 167.

$ gcloud components update --version 167.0.0
-- Sean Sullivan
Source: StackOverflow