I have a kubernetes cluster installed using 5 Virtual machines. 1 for the kubernetes master, and the other for the workers.
I tried using RBAC method, I created a kubeconfig file to give access to only one namespace, when I test it using (kubectl --kubeconfig developper.kubeconfig get pods), it works but if this user didn't use the flag --kubeconfig, he can simply use: kubectl get all --all-namespaces( for axample ) and he will be able the access to all the cluster resources, So this is not the efficient method that I need.
Do you have any other solutions please?