Getting errors on Hello-Wordpress Sample

12/4/2014

Following the steps from https://cloud.google.com/container-engine/docs/hello-wordpress

all works until I get to "gcloud compute instances list" I get these errors:

[ec2-user@ip-10-00-00-000~]$ gcloud compute instances list NAME ZONE MACHINE_TYPE INTERNAL_IP EXTERNAL_IP STATUS Traceback (most recent call last): File "/home/ec2-user/google-cloud-sdk/./lib/googlecloudsdk/gcloud/gcloud.py", line 175, in <module> main() File "/home/ec2-user/google-cloud-sdk/./lib/googlecloudsdk/gcloud/gcloud.py", line 171, in main _cli.Execute() File "/home/ec2-user/google-cloud-sdk/./lib/googlecloudsdk/calliope/cli.py", line 385, in Execute post_run_hooks=self.__post_run_hooks, kwargs=kwargs) File "/home/ec2-user/google-cloud-sdk/./lib/googlecloudsdk/calliope/frontend.py", line 274, in _Execute pre_run_hooks=pre_run_hooks, post_run_hooks=post_run_hooks) File "/home/ec2-user/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 930, in Run output_formatter(result) File "/home/ec2-user/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 916, in OutputFormatter command_instance.Display(args, obj) File "/home/ec2-user/google-cloud-sdk/./lib/googlecloudsdk/compute/lib/base_classes.py", line 304, in Display PrintTable(resources, self._resource_spec.table_cols) File "/home/ec2-user/google-cloud-sdk/./lib/googlecloudsdk/compute/lib/base_classes.py", line 46, in PrintTable for resource in resources: File "/home/ec2-user/google-cloud-sdk/./lib/googlecloudsdk/compute/lib/base_classes.py", line 289, in Run for item in items: File "/home/ec2-user/google-cloud-sdk/./lib/googlecloudsdk/compute/lib/lister.py", line 29, in ProcessResults yield field_selector.Apply(resource) File "/home/ec2-user/google-cloud-sdk/./lib/googlecloudsdk/compute/lib/property_selector.py", line 355, in Apply res = _DictToOrderedDict(obj) File "/home/ec2-user/google-cloud-sdk/./lib/googlecloudsdk/compute/lib/property_selector.py", line 177, in _DictToOrderedDict new_obj = collections.OrderedDict(sorted(obj.items())) AttributeError: 'module' object has no attribute 'OrderedDict'

Since that works on my windows box I ignore and move to the next step and get these errors:

    [ec2-user@ip-10-00-00-000~]$ gcloud preview container pods create wordpress --cluster-name
    hello-world  --image=tutum/wordpress --port=80
    Usage: gcloud preview container pods create [optional flags]

    Create a pod running in a cluster.

    optional flags:
      --cluster-name CLUSTER_NAME, -n CLUSTER_NAME
                             The name of this cluster.
      --config-file CONFIG_FILE
                             Path to the pod config
      --format FORMAT        Format for printed output.
      --help                 Display detailed help.
      --image IMAGE          The Docker image to use
      --name NAME            The name of the pod
      --port PORT            A port to expose
      --project PROJECT_ID   Google Cloud Platform project ID to use for this
                             invocation.
      --purge-config-cache   Clear cached config data for the cluster. If set, will
                             call 'container clusters describe' directly to get
                             cluster data before executing kubernetes client
                             command.
      --quiet, -q            Disable all interactive prompts.
      --zone ZONE, -z ZONE   The compute zone (e.g. us-central1-a) for the cluster
      -h                     Print a summary help and exit.

    ERROR: (gcloud.preview.container.pods.create) unrecognized arguments: wordpress

tried reordering the parameters but still get the same error above. Any ideas?

-- Mike A
google-kubernetes-engine

2 Answers

12/4/2014

Try:

gcloud preview container pods create --name wordpress --cluster-name hello-world --image=tutum/wordpress --port=80

The name of the pod is now specified as an argument as shown in the usage output:

"--name NAME The name of the pod"

-- Robert Bailey
Source: StackOverflow

12/4/2014

From the list instances output it looks like your cloud-sdk installation may be broken. Try reinstalling the cloud sdk following instructions here: https://cloud.google.com/sdk/

-- jeffml
Source: StackOverflow