After creating new VCF Context, unable to list the pods with Supervisor Administrator Role on the Supervisor folder getting below error
kubectl get pods -A
Error from server (Forbidden) : pods " A" is forbidden: User "sso: [email protected]" cannot get resource "pods" in API group "" in the namespace "<namespace>"
Error from server (Forbidden) : pods is forbidden: User "sso: user@example" cannot list resource "pods" in API group "" at the cluster scope
Supervisor 9.x
When the Supervisor Administrator role is assigned on the Supervisor folder, a context is created that gives access only to cluster level resources in the Supervisor and not the vSphere Namespace. That is, you cannot list or view vSphere Namespaces. To be able to view vSphere Namespaces when you log in through VCF CLI, you must have permissions on the specific vSphere Namespace with Namespace Owner/Edit/View Role
Assign Permission for the Namespace with Namespace Owner/Edit/View Role to access the cluster level resources.
Method 1:
[email protected].Method 2:
[email protected].
Workaround:
If a single LDAP user needs to manage both the Supervisor and the applications/pods within the Namespace, follow the below steps:
At the Supervisor Folder: Add the user with the Supervisor Administrator role, but uncheck "Propagate to children."
At the Namespace Folder: Add the user with the Namespace Owner/Edit role and check "Propagate to children."
How Permissions Work in Supervisor
SupervisorServices.ManageNamespaces.ManageNamespaces.Configure