Skip to content

Commit

Permalink
secret auth added quite1
Browse files Browse the repository at this point in the history
  • Loading branch information
kundan59 committed Sep 12, 2023
1 parent b59ef84 commit 1adfb4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps-deployment-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ PROJECT_ID="$(gcloud config get-value project)"
REGION="$1"
# install gke-gcloud-auth-plugin to install kubectl and authenticate gke.
gcloud --quiet components install gke-gcloud-auth-plugin
gcloud --quiet 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(){

Expand All @@ -22,6 +20,8 @@ build_and_deploy_service(){
echo "--------pushed docker image, deploy to gke cluster--------------------------"

gcloud container clusters get-credentials "$CLUSTER_NAME" --region "$REGION"
gcloud --quiet 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
# setup kustomize
curl -sfLo kustomize https://github.com/kubernetes-sigs/kustomize/releases/download/v3.1.0/kustomize_3.1.0_linux_amd64
chmod u+x ./kustomize
Expand Down

0 comments on commit 1adfb4d

Please sign in to comment.