我在TF中创建(
0.11.14
)GCP角色,将其附加到服务帐户,并为后者创建了一个密钥,如下所示:
resource "google_service_account_key" "my_service_account_key" {
service_account_id = "${google_service_account.my_service_account.id}"
}
然后我采取
private_key
输出方式如下:
output "my_service_account_private_key" {
value = "${google_service_account_key.my_service_account_key.private_key}"
sensitive = true
}
这给我印了一根很长的绳子,像
ewogICJK49fo34KFo4 .... 49k92kljg==
假设该角色具有对GCS bucket进行读/写的权限,我如何将上述凭据/私钥传递给(GKE)pod/部署,以便pod被授予特定的服务帐户(从而能够执行相应权限允许的操作,例如对bucket的读/写)?