| description | Configure GKE Workload Identity for Spice.ai on Google Kubernetes Engine. |
|---|
GKE Workload Identity allows Spice.ai pods on Google Kubernetes Engine to authenticate as a Google Cloud service account for accessing GCP services (GCS, BigQuery, Secret Manager, etc.).
Annotate the Spice ServiceAccount with the GCP service account email:
serviceAccount:
create: true
annotations:
iam.gke.io/gcp-service-account: my-gcp-sa@my-project.iam.gserviceaccount.comapiVersion: spice.ai/v1
kind: SpicepodSet
metadata:
name: my-spicepod
spec:
replicas: 1
service_account:
enabled: true
create: true
annotations:
iam.gke.io/gcp-service-account: my-gcp-sa@my-project.iam.gserviceaccount.com
spicepod: |
name: my-spicepod
kind: Spicepod
version: v1- Enable Workload Identity on your GKE cluster.
- Create a GCP service account with the required IAM roles.
- Bind the Kubernetes
ServiceAccountto the GCP service account:
gcloud iam service-accounts add-iam-policy-binding \
my-gcp-sa@my-project.iam.gserviceaccount.com \
--role roles/iam.workloadIdentityUser \
--member "serviceAccount:my-project.svc.id.goog[NAMESPACE/SERVICE_ACCOUNT_NAME]"