2

I'm following the "hello wordpress" example: https://cloud.google.com/container-engine/docs/tutorials/hello-wordpress, but it stops with:

henrik_ormasen_gmail_com@k8s-test2-master:~$ gcloud alpha container kubectl create -f wordpress.json
Traceback (most recent call last):
  File "/usr/local/bin/../share/google/google-cloud-sdk/./lib/googlecloudsdk/gcloud/gcloud.py", line 209, in <module>
    main()
  File "/usr/local/bin/../share/google/google-cloud-sdk/./lib/googlecloudsdk/gcloud/gcloud.py", line 205, in main
    _cli.Execute()
  File "/usr/local/bin/../share/google/google-cloud-sdk/./lib/googlecloudsdk/calliope/cli.py", line 537, in Execute
    result = args.cmd_func(cli=self, args=args)
  File "/usr/local/bin/../share/google/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 1073, in Run
    last_group = context_filter(tool_context, Http, args)
  File "/usr/local/bin/../share/google/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 458, in ContextFilter
    group.Filter(context, args)
  File "/usr/local/share/google/google-cloud-sdk/lib/googlecloudsdk/container/commands/__init__.py", line 61, in Filter
    credentials=cli.Credentials(),
AttributeError: 'module' object has no attribute 'Credentials'
henrik_ormasen_gmail_com@k8s-test2-master:~$ 

I also get this error running most other kubectl commands. And also gcloud alpha container clusters create

I've also tried: gcloud auth login without help. What are I missing?

henrik_ormasen_gmail_com@k8s-test2-master:~$ gcloud --version
Google Cloud SDK 0.9.61

alpha 2015.05.19
bq 2.0.18
bq-nix 2.0.18
compute 2015.05.19
core 2015.05.19
core-nix 2014.12.17
dns 2015.05.19
gcloud 2015.05.19
gcutil 1.16.5
gcutil-nix 1.16.5
gsutil 4.12
gsutil-nix 4.7
kubectl 
kubectl-linux-x86_64 0.17.0
sql 2015.05.06
Henrik Ormåsen
  • 850
  • 1
  • 9
  • 18

1 Answers1

6

It looks like your gcloud installation somehow got into a partially updated state. If gcloud components update doesn't do anything, try reinstalling.

jeffml
  • 2,791
  • 1
  • 10
  • 4
  • (Reinstalling fixed it) – Henrik Ormåsen May 23 '15 at 18:45
  • for me as well! – Vini Apr 24 '17 at 12:46
  • 2
    Not for me: attempting to install got me: `ERROR:root:code for hash md5 was not found.` – tgf Nov 29 '19 at 22:37
  • @tgf your system is MacOS? – NULL Dec 02 '19 at 15:13
  • 2
    @tgf okay, if it is then you should try `brew upgrade python2` - upgrade to 2.7.17 worked for me (gcloud version was 270.0.0) – NULL Dec 02 '19 at 15:43
  • @NULL - I'm on OSX and Python 2.7.17. I `brew uninstall openssl brew install openssl` and eventually got it working. Somewhere along the way this also tanked my ruby installs. My coworker ended up with the exact same problem so this may be tied to a recent brew update, not sure. – tgf Dec 02 '19 at 20:44