Reputation: 51
I have a hard time trying to set up my (test) Kubernetes cluster so that it have a few users and a few namespaces, and a user can only see specific namespaces. Is there a way to do that? If yes, what is needed to
Upvotes: 5
Views: 3619
Reputation: 3454
You could setup ABAC (http://kubernetes.io/docs/admin/authorization/) and limit users to namespaces:
In the policy file you would have something like this if your user was bob
and you wanted to limit him to the namespace projectCaribou
:
{
"apiVersion": "abac.authorization.kubernetes.io/v1beta1",
"kind": "Policy",
"spec": {
"namespace": "projectCaribou",
"readonly": true,
"resource": "pods",
"user": "bob"
}
}
Upvotes: 5