I can access the kubectl
with root user. I want to restrict the access of kubectl
to non-root users so that they can perform all the kubectl
operations. How should I achieve the same?
kubectl
client it's distributed as a binary file so depending on your host you might give exec access to all users by doing chmod +x /usr/local/bin/kubectl
or you can add a custom rule to your /etc/sudoers
by using visudo
your_user ALL = NOPASSWD: /usr/local/bin/kubectl
your user will be able to run kubectl
like this
sudo kubectl ...