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?
Simply remove the admin context and the accompanied user from your ~/.kube/config
file.