Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save higebu/d4c6b4d1107307d4b8f20c6cfb2237c8 to your computer and use it in GitHub Desktop.
Save higebu/d4c6b4d1107307d4b8f20c6cfb2237c8 to your computer and use it in GitHub Desktop.
[GCP] Workload Identity Test on GKE Autopilot

https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity?hl=ja

Autopilot では nodeSelector で iam.gke.io/gke-metadata-server-enabled が使えないので、 wi-test.yaml を下記のようにする (Autopilot ではデフォルトで iam.gke.io/gke-metadata-server-enabledtrue になっている)

apiVersion: v1
kind: Pod
metadata:
  name: workload-identity-test
  namespace: default
spec:
  containers:
    - image: google/cloud-sdk:slim
      name: workload-identity-test
      command: ["sleep","infinity"]
  serviceAccountName: sql-proxy-account
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment