daverocks
daverocks

Reputation: 2353

RBAC: kubectl config use-context

I've set up my k8s Cluster with an admin role and user role and I'm able to switch between roles using

kubectl config use-context admin-context

or

kubectl config use-context user-context

But I don't want the user role to be able to perform this command and switch between admin and user role.

So whats is the best solution? add token or username & password possibly?

Upvotes: 0

Views: 442

Answers (1)

Sam
Sam

Reputation: 6160

Simply remove the admin context and the accompanied user from your ~/.kube/config file.

Upvotes: 1

Related Questions