Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I'm trying to follow this step by step to upload the airflow in Kubernetes (https://github.com/EamonKeane/airflow-GKE-k8sExecutor-helm) but in this part of the execution I have problems as follows:

Researching on the topic did not find anything that solved so far my problem, does anyone have any suggestions of what to do?

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

like image 473
Felipe FB Avatar asked Jun 18 '19 17:06

Felipe FB


2 Answers

I solved this by creating a new cloud shell tab to connect the cluster:

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

like image 114
Felipe FB Avatar answered Oct 22 '22 03:10

Felipe FB


Example:

get the name and location of your cluster

gcloud container clusters list

then

gcloud container clusters get-credentials demo --region=us-west1-a
like image 32
Yussel luna Avatar answered Oct 22 '22 01:10

Yussel luna