How to fix RoleBinding not found in Kubernetes

KubernetesINTERMEDIATEMEDIUMUpdated Dec 6, 2025ยท 127 views

The RoleBinding referenced by your pod or service account does not exist. Fix by ensuring the RoleBinding is created in the correct namespace, verify its name matches what's referenced, and confirm the Role it points to exists before the RoleBinding.

Quick fix

Fixes RoleBinding not found

# View pod events
kubectl describe pod <pod-name> -n <namespace>

# Check recent events in the namespace
kubectl get events -n <namespace> --sort-by=.metadata.creationTimestamp | tail -20

# If using RBAC audit, check API server logs
kubectl logs -n kube-system -l component=kube-apiserver | grep RBAC
  1. Identify which RoleBinding is missing
  2. Verify the RoleBinding exists in the correct namespace
  3. Create the missing RoleBinding
  4. Ensure the Role exists before the RoleBinding
kubernetes โ€” error
# View pod events
kubectl describe pod <pod-name> -n <namespace>
# Check recent events in the namespace
kubectl get events -n <namespace> --sort-by=.metadata.creationTimestamp | tail -20
# If using RBAC audit, check API server logs
kubectl logs -n kube-system -l component=kube-apiserver | grep RBAC
RoleBinding not found

What this error means

A RoleBinding is a Kubernetes resource that grants permissions (defined in a Role or ClusterRole) to users, groups, or service accounts. When Kubernetes cannot find a RoleBinding, it usually means the binding object was never created, was created in the wrong namespace, or was deleted. RoleBindings are namespace-scoped resources, so a RoleBinding in the default namespace is invisible to pods in other namespaces. This error often occurs during pod startup when the kubelet tries to validate RBAC permissions using a RoleBinding that doesn't exist, or when kubectl commands reference a non-existent binding. Unlike "Permission denied" errors (which mean a binding exists but lacks required permissions), "not found" means the binding itself is missing.

Typical symptoms

  • kubectl get rolebinding returns the binding in one namespace, but pods in another namespace cannot use it
  • kubectl auth can-i command shows RBAC failure because the RoleBinding doesn't exist
  • Pod startup fails silently or with vague permission errors, then succeeds after manually creating the RoleBinding
  • Service account can't access resources even though admin verified the RoleBinding was created
  • Different namespaces report different permission behavior for the same service account
  • kubectl describe rolebinding returns "not found" when explicitly checking
  • Helm deployments fail to grant service account permissions until Helm charts are manually edited

Common causes

  1. RoleBinding created in default namespace, but pod uses a service account in a different namespace
  2. RoleBinding name typo or mismatch between what kubectl expects and what was created
  3. RoleBinding deleted by accident or by a cleanup script, but pods still expect it to exist
  4. RoleBinding never created, only the Role or ClusterRole exists without a corresponding binding
  5. Using RoleBinding with a ClusterRole in wrong namespace (should use ClusterRoleBinding for cluster-wide access)
  6. Infrastructure-as-Code (Terraform, Helm, Kustomize) creates resources out of order, binding before Role exists
  7. Service account created in namespace A, but RoleBinding created in namespace B

How to fix "RoleBinding not found"

1Identify which RoleBinding is missing

First, determine what RoleBinding your pod or service account expects. Check pod logs and events:

bash
# View pod events
kubectl describe pod <pod-name> -n <namespace>

# Check recent events in the namespace
kubectl get events -n <namespace> --sort-by=.metadata.creationTimestamp | tail -20

# If using RBAC audit, check API server logs
kubectl logs -n kube-system -l component=kube-apiserver | grep RBAC

Look for error messages containing the RoleBinding name or "not found" in the output.

2Verify the RoleBinding exists in the correct namespace

RoleBindings are namespace-scoped. List all RoleBindings in every namespace:

bash
# List RoleBindings in current namespace
kubectl get rolebinding -n <namespace>

# List all RoleBindings across all namespaces
kubectl get rolebinding -A

# Check if a specific RoleBinding exists
kubectl get rolebinding <rolebinding-name> -n <namespace>

If the output is empty or the binding doesn't appear, it doesn't exist yet. Note the namespace where your pod is running vs. where the RoleBinding should exist (they must match).

3Create the missing RoleBinding

If the RoleBinding is missing, create it. First, verify the Role it references exists:

bash
# List all Roles in the namespace
kubectl get role -n <namespace>

# View the Role definition
kubectl get role <role-name> -n <namespace> -o yaml

Then create the RoleBinding using kubectl:

bash
kubectl create rolebinding <rolebinding-name> \
  --clusterrole=<role-name> \
  --serviceaccount=<namespace>:<service-account-name> \
  -n <namespace>

Or use a YAML manifest:

yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: my-rolebinding
  namespace: my-namespace
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: my-role
subjects:
- kind: ServiceAccount
  name: my-service-account
  namespace: my-namespace

Apply it:

bash
kubectl apply -f rolebinding.yaml
4Ensure the Role exists before the RoleBinding

RoleBindings reference a Role or ClusterRole. Both must exist. If using Infrastructure-as-Code (Terraform, Helm, Kustomize), ensure the Role is created before the RoleBinding:

yaml
# BAD: RoleBinding created first, then Role
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: my-binding
roleRef:
  kind: Role
  name: my-role  # This role doesn't exist yet!
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: my-role
rules:
  - apiGroups: [""]
    resources: [pods]
    verbs: [get, list]

Reorder so Role comes first:

yaml
# GOOD: Role created first
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: my-role
rules:
  - apiGroups: [""]
    resources: [pods]
    verbs: [get, list]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: my-binding
roleRef:
  kind: Role
  name: my-role
subjects:
- kind: ServiceAccount
  name: default
5Check namespace mismatch: RoleBinding vs service account

A common mistake is creating a RoleBinding in one namespace but expecting it to work for a service account in another namespace.

bash
# Find which namespace your service account is in
kubectl get serviceaccount -A | grep <service-account-name>

# List RoleBindings in that same namespace
kubectl get rolebinding -n <correct-namespace>

The RoleBinding MUST be in the same namespace as the service account it grants permissions to:

yaml
# Service account in "app" namespace
apiVersion: v1
kind: ServiceAccount
metadata:
  name: app-sa
  namespace: app
---
# RoleBinding must ALSO be in "app" namespace
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: app-reader
  namespace: app  # SAME namespace!
roleRef:
  kind: Role
  name: pod-reader
subjects:
- kind: ServiceAccount
  name: app-sa
  namespace: app
6Use ClusterRoleBinding for cluster-wide access, not RoleBinding

A common confusion: RoleBinding grants permissions only within a single namespace. If you need cluster-wide access, use a ClusterRoleBinding with a ClusterRole:

bash
# This only grants permissions in the current namespace
kubectl create rolebinding my-binding \
  --clusterrole=view \
  --serviceaccount=default:default \
  -n default

# For cluster-wide access, use ClusterRoleBinding
kubectl create clusterrolebinding my-cluster-binding \
  --clusterrole=view \
  --serviceaccount=default:default

ClusterRoleBindings reference ClusterRoles and grant permissions across all namespaces. Ensure you're using the correct resource type for your use case.

7Verify the RoleBinding works with kubectl auth can-i

After creating the RoleBinding, test whether the service account now has the expected permissions:

bash
# Test if service account can perform an action
kubectl auth can-i get pods \
  --as=system:serviceaccount:<namespace>:<service-account-name> \
  -n <namespace>

# Expected output
yes  # Permissions granted
# or
no   # Permissions still not granted

# View detailed RBAC decision
kubectl auth can-i get pods \
  --as=system:serviceaccount:default:my-sa \
  -n default \
  --record

If the output is "no", the RoleBinding exists but lacks the required permission. See the "Permission denied" error guide for solutions.

Advanced notes

RoleBindings cannot be updated after creation; the roleRef field is immutable. If you need to change which Role a binding references, delete and recreate the binding. In managed Kubernetes (EKS, GKE, AKS), system namespaces like kube-system have default RoleBindings for system service accounts; if you accidentally delete these, cluster components may fail. Use kubectl describe and kubectl get -o yaml to inspect RBAC resources in detail. For troubleshooting across multiple clusters, note that RoleBindings are cluster-local; a binding created on one cluster doesn't exist on another. If using GitOps (Flux, ArgoCD), ensure RBAC resources are applied in the correct order and namespace. Helm charts should use ServiceAccount and RoleBinding helpers (e.g., helm.sh/hook dependencies) to ensure correct ordering. In clusters with multi-tenancy, always verify RoleBindings are created in the correct tenant namespace, not the shared admin namespace.

Frequently asked questions

What does "RoleBinding not found" mean?
A RoleBinding is a Kubernetes resource that grants permissions (defined in a Role or ClusterRole) to users, groups, or service accounts. When Kubernetes cannot find a RoleBinding, it usually means the binding object was never created, was created in the wrong namespace, or was deleted. RoleBindings are namespace-scoped resources, so a RoleBinding in the default namespace is invisible to pods in other namespaces.
How do I fix "RoleBinding not found"?
The RoleBinding referenced by your pod or service account does not exist. Fix by ensuring the RoleBinding is created in the correct namespace, verify its name matches what's referenced, and confirm the Role it points to exists before the RoleBinding.
What causes "RoleBinding not found"?
RoleBinding created in default namespace, but pod uses a service account in a different namespace RoleBinding name typo or mismatch between what kubectl expects and what was created RoleBinding deleted by accident or by a cleanup script, but pods still expect it to exist
Is the "RoleBinding not found" error serious?
It is a medium-severity error โ€” more of a blocker than a risk. The steps above resolve it.

Official resources & further reading