Ilya Ayzenshtok
Ilya Ayzenshtok

Reputation: 731

Changing Role permissions for an active (in-use) ServiceAccount in Kubernetes

Suppose a simple RBAC setup in Kubernetes (assuming default namespace for simplicity):

As all entities are created, the pod is able to get the pods successfully.

Now, I want to change the underlying Role in the cluster - for example, restrict it to another namespace, or just remove permissions for the Pods altogether. Note that I'm only changing the Role - no other entities are changed.

My expectation is that eventually somehow the pod would get the change, and won't be able to get the pods anymore.

In fact, the pod continues to chug alone like nothing changed. I do know that the Bearer Token is mounted in the pod in a well-known location.

My question is this: is it the question of a longer time-out (in other words, if I let the pod run for X minutes, the change will take effect), or am I missing something fundamental here?

Upvotes: 2

Views: 459

Answers (0)

Related Questions