按照https://cloud.google.com/container-engine/docs/hello-wordpress中的步骤
一切正常,直到我到达“gcloud 计算实例列表”我得到这些错误:
[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'
由于这适用于我的 Windows 框,因此我忽略并转到下一步并收到以下错误:
[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
尝试重新排序参数,但仍然得到上述相同的错误。有任何想法吗?