Skip to content

Commit

Permalink
[Doc] Minor fix to MKP secret setup guide (#2576)
Browse files Browse the repository at this point in the history
* fix doc

* apply suggestion

* split line
  • Loading branch information
Jiaxiao Zheng authored Nov 9, 2019
1 parent 2d4da0e commit 9f258a8
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions manifests/gcp_marketplace/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ Then you can create a service account with the necessary IAM permissions
export SA_NAME=<my-account>
export NAMESPACE=<namespace-where-kfp-was-installed>
# Create service account
gcloud iam service-accounts create $SA_NAME --display-name $SA_NAME --project "$PROJECT_ID"
gcloud iam service-accounts create $SA_NAME \
--display-name $SA_NAME --project "$PROJECT_ID"
# Grant permissions to the service account by binding roles
gcloud projects add-iam-policy-binding $PROJECT_ID \
--member=serviceAccount:$SA_NAME@$PROJECT_ID.iam.gserviceaccount.com \
Expand All @@ -59,13 +60,10 @@ and store the service account credential as a Kubernetes secret `user-gcp-sa` in
# Create credential for the service account
gcloud iam service-accounts keys create application_default_credentials.json --iam-account $SA_NAME@$PROJECT_ID.iam.gserviceaccount.com
# Make sure the secret is created under the correct namespace.
kubectl config set-context --current --namespace=$NAMESPACE
# Attempt to create a k8s secret. If already exists, override.
kubectl create secret generic user-gcp-sa \
--from-file=user-gcp-sa.json=application_default_credentials.json \
--dry-run -o yaml | kubectl apply -f -
-n $NAMESPACE --dry-run -o yaml | kubectl apply -f -
```
Remove the private key file if needed
```
Expand Down

0 comments on commit 9f258a8

Please sign in to comment.