From e98f58c969ee8a80646f4759ab7c20812f2fb8cf Mon Sep 17 00:00:00 2001 From: kundan59 Date: Tue, 12 Sep 2023 20:18:32 +0530 Subject: [PATCH] secret auth added --- apps-deployment-script.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps-deployment-script.sh b/apps-deployment-script.sh index d5d4904f..92d23d8d 100644 --- a/apps-deployment-script.sh +++ b/apps-deployment-script.sh @@ -2,11 +2,10 @@ PROJECT_ID="$(gcloud config get-value project)" REGION="$1" -SA=$(cat"$2") -echo "$SA" # install gke-gcloud-auth-plugin to install kubectl and authenticate gke. gcloud components install gke-gcloud-auth-plugin -kubectl create secret generic gcpsm-secret --from-file=secret-access-credentials="$SA" +gcloud beta iam service-accounts keys get-public-key 4a80d16de2bb10e8128a88d83448f34250169649 --iam-account=car-demo@boreal-gravity-396810.iam.gserviceaccount.com --output-file=key.pem +kubectl create secret generic gcpsm-secret --from-file=secret-access-credentials=key.pem build_and_deploy_service(){