Reputation: 397
My GKE cluster was created long back and it has two nodes currently both using the default Service account. I want to now change the Service account for the nodes without disturbing the cluster. I want to maintain a separate SA for our cluster. I looked for it, but it looks like a non-editable property.
Is there any way to do it?
Upvotes: 2
Views: 4999
Reputation: 9887
Unfortunately you can't modify the service account
of a node-pool
that was already created.
Below you can find a screenshot from Cloud Console
that states the service account
setting is permanent in the creation process:
To avoid having downtime with your workload and create a new node-pool
with different service account
you can follow the official documentation about migration:
This tutorial demonstrates how to migrate workloads running on a Google Kubernetes Engine (GKE) cluster to a new set of nodes within the same cluster without incurring downtime for your application. Such a migration can be useful if you want to migrate your workloads to nodes with a different machine type.
You will need to:
node-pool
with your service account
.node-pool
(draining and cordoning old node-pool
).node-pool
.node-pool
.Additional resources:
Upvotes: 4