在Kubectl获取节点命令时出错

时间:2019-04-10 12:58:41

标签: kubernetes gcloud kubectl

运行以下命令时出现错误。我已经更新了gcloud SDK,但仍然遇到相同的错误。

kubectl get nodes


Unable to connect to the server: error executing access token command "/Users/salayhin/google-cloud-sdk/bin/gcloud config config-helper --format=json": err=exit status 1 output= stderr=Traceback (most recent call last):
  File "/Users/salayhin/google-cloud-sdk/lib/gcloud.py", line 95, in <module>
    main()
  File "/Users/salayhin/google-cloud-sdk/lib/gcloud.py", line 54, in main
    from googlecloudsdk.core.util import encoding
  File "/Users/salayhin/google-cloud-sdk/lib/googlecloudsdk/__init__.py", line 23, in <module>
    from googlecloudsdk.core.util import lazy_regex
  File "/Users/salayhin/google-cloud-sdk/lib/googlecloudsdk/core/util/lazy_regex.py", line 25, in <module>
    from googlecloudsdk.core.util import lazy_regex_patterns
ImportError: cannot import name lazy_regex_patterns

1 个答案:

答案 0 :(得分:1)

似乎{@ 3}}发生了Google Cloud SDK错误,表明您可能在同一目录中缺少here

我建议在使用的任何系统上重新安装this file