kubectl vsphere login, users are unable to list cluster resources such as namespaces, pods, and nodes. The following errors are observed:[root@client-host~]# kubectl get ns Error from server (Forbidden) : namespaces is forbidden: User "sso:user@example.com" cannot list resource "namespaces" in API group "" at the cluster scope
[root@client-host ~]# kubectl get pods -A Error from server (Forbidden) : pods is forbidden: User "sso:user@example.com" cannot list resource "pods" in API group "" at the cluster scope
[root@client-host ~]# kubectl auth can-i list pods -n <namespace> no
[root@client-host ~]# kubectl auth can-i list pods -A no
administrator@vsphere.local), the user is able to successfully list pods, namespaces, and nodes from the Supervisor Cluster context.- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: view:<domain>:<user> roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: view subjects: - apiGroup: rbac.authorization.k8s.io kind: User name: user@domain # Missing 'sso:' prefix,using domain alias and not using FQDN
- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: configure-admission-policy:<domain>:<user> roleRef: kind: ClusterRole name: configure-admission-policy subjects: - apiGroup: rbac.authorization.k8s.io kind: User name: user@domain
Supervisor 9.x
This issue occurs due to a mismatch between the Identity Provider (IDP) domain alias and the fully qualified domain name (FQDN) expected by the Supervisor Cluster.
In this scenario:
To resolve this issue, the configured Identity Provider (IDP) must be removed and reconfigured with the correct domain settings.
A permanent fix for this issue is currently in progress and will be included in a future vSphere release to properly handle domain alias and FQDN mappings in the Supervisor authorization service