执行访问令牌命令时出错“/google/google-cloud-sdk/bin/gcloud config-helper --format=json

Error executing access token command "/google/google-cloud-sdk/bin/gcloud config-helper --format=json

我试图按照这个步骤一步一步地在 Kubernetes 中上传气流(https://github.com/EamonKeane/airflow-GKE-k8sExecutor-helm)但是在执行的这一部分我遇到了如下问题:

到目前为止,对该主题的研究没有找到解决我的问题的任何方法,有没有人有任何建议可以做什么?

SQL_ALCHEMY_CONN=postgresql+psycopg2://$AIRFLOW_DB_USER:$AIRFLOW_DB_USER_PASSWORD@$KUBERNETES_POSTGRES_CLOUDSQLPROXY_SERVICE:$KUBERNETES_POSTGRES_CLOUDSQLPROXY_PORT/$AIRFLOW_DB_NAME

echo $SQL_ALCHEMY_CONN > /secrets/airflow/sql_alchemy_conn
# Create the fernet key which is needed to decrypt database the database
FERNET_KEY=$(dd if=/dev/urandom bs=32 count=1 2>/dev/null | openssl base64)
echo $FERNET_KEY > /secrets/airflow/fernet-key

kubectl create secret generic airflow \
    --from-file=fernet-key=/secrets/airflow/fernet-key \
    --from-file=sql_alchemy_conn=/secrets/airflow/sql_alchemy_conn

Unable to connect to the server: error executing access token command "/google/google-cloud-sdk/bin/gcloud config config-helper --format=json": err=exit status 1 output= stderr=ERROR: gcloud crashed (BadStatusLine): '' If you would like to report this issue, please run the following command: gcloud feedback To check gcloud for common problems, please run the following command: gcloud info --run-diagnostics

我通过创建一个新的云 shell 选项卡来连接集群解决了这个问题:

gcloud container clusters get-credentials testcluster1 --zone = your_zone

示例:

获取集群的名称和位置

gcloud container clusters list

然后

gcloud container clusters get-credentials demo --region=us-west1-a