snc icon indicating copy to clipboard operation
snc copied to clipboard

Add role for developer user to access resources on default namespace

Open anjannath opened this issue 4 months ago • 3 comments

Without this role added, we get the following error when using the crc-developer context:

% oc project
error: you do not have rights to view project "default" specified in your config or the project doesn't exist

% oc get all -n default
Error from server (Forbidden): pods is forbidden: User "developer" cannot list resource "pods" in API group "" in the namespace "default"
Error from server (Forbidden): replicationcontrollers is forbidden: User "developer" cannot list resource "replicationcontrollers" in API group "" in the namespace "default"

After adding the role, rolebinding developer user is able to access resources on the namespace:

% oc get all -n default
Warning: apps.openshift.io/v1 DeploymentConfig is deprecated in v4.14+, unavailable in v4.10000+
NAME                 TYPE           CLUSTER-IP   EXTERNAL-IP                            PORT(S)   AGE
service/kubernetes   ClusterIP      10.217.4.1   <none>                                 443/TCP   41d
service/openshift    ExternalName   <none>       kubernetes.default.svc.cluster.local   <none>    41d

fixes #703

anjannath avatar Sep 30 '24 08:09 anjannath