# Role and Role binding not working

**URL:** <https://discuss.kubernetes.io/t/role-and-role-binding-not-working/31854>\
**Category:** General Discussions\
**Tags:** development, kubernetes-custom-resources\
**Created:** [March 13, 2025, 12:16pm UTC](https://discuss.kubernetes.io/t/role-and-role-binding-not-working/31854 "2025-03-13T12:16:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kalyan\_P](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/kalyan_p/32/17047_2.png) [@Kalyan\_P](https://discuss.kubernetes.io/u/Kalyan_P)\
**Post date:** [March 13, 2025, 12:16pm UTC](https://discuss.kubernetes.io/t/role-and-role-binding-not-working/31854/1 "2025-03-13T12:16:35Z")

</div>

Asking for help? Comment out what you need so we can get more information to help you!

facing the following issue  
@controleplanenode:/usr/local/k8s\_manifests/authentication/certs/rbac$ kubectl get po --context=sree-context  
Error from server (Forbidden): pods is forbidden: User "sree " cannot list resource “pods” in API group “” in the namespace “default”

* * *

role and role binding files

apiVersion: [rbac.authorization.k8s.io/v1](http://rbac.authorization.k8s.io/v1)  
kind: Role  
metadata:  
name: pod-read-access  
namespace: default  
rules:

- apiGroups: [“”] # “” indicates the core API group  
resources: [“pods”]  
verbs: [“get”, “watch”, “list”]

* * *

apiVersion: [rbac.authorization.k8s.io/v1](http://rbac.authorization.k8s.io/v1)  
kind: RoleBinding  
metadata:  
name: pod-ro-binding  
namespace: default  
subjects:

- kind: User  
name: sree  
namespace: default  
apiGroup: [rbac.authorization.k8s.io](http://rbac.authorization.k8s.io)  
roleRef:  
kind: Role  
name: pod-read-access  
apiGroup: [rbac.authorization.k8s.io](http://rbac.authorization.k8s.io)
