Skip to content

Commit

Permalink
update README GKE Workload Identity instructions to be more accurate …
Browse files Browse the repository at this point in the history
…and include the last step of annotating the k8s sa

Signed-off-by: Rover van der Noort <[email protected]>
  • Loading branch information
rvandernoort committed Sep 19, 2024
1 parent 293d60d commit 1167815
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,16 @@ Namespace is already created in step 1 above.
```bash
gcloud iam service-accounts add-iam-policy-binding \
--role roles/iam.workloadIdentityUser \
--member "serviceAccount:[$PROJECT_ID].svc.id.goog[$NAMESPACE/$KSA_NAME]" \
[$GSA_NAME]@[$PROJECT_ID].iam.gserviceaccount.com
--member "serviceAccount:$PROJECT_ID.svc.id.goog[$NAMESPACE/$KSA_NAME]" \
$GSA_NAME@$PROJECT_ID.iam.gserviceaccount.com
```
4. Add annotation to Kubernetes Service Account
```bash
kubectl annotate serviceaccount $KSA_NAME \
--namespace $NAMESPACE \
iam.gke.io/gcp-service-account=$GSA_NAME@$PROJECT_ID.iam.gserviceaccount.com
```
In this case:
Expand Down
1 change: 1 addition & 0 deletions changelogs/unreleased/195-rvandernoort
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update README GKE Workload Identity instructions

0 comments on commit 1167815

Please sign in to comment.