"no RBAC policy matched" error when creating a CronJob

Solution Verified - Updated -

Issue

  • When issuing oc create job --from=cronjob/example --namespace=example-namespace another-cronjob, the following error messages are returned:

    error: failed to create job: jobs.batch "example" is forbidden: cannot set blockOwnerDeletion if an ownerReference refers to a resource you can't set finalizers on: no RBAC policy matched, <nil>
    

    or

    Error from server (Forbidden): cronjobs.batch "example" is forbidden: User "myuser" cannot get cronjobs.batch in the namespace "example-namespace": no RBAC policy matched
    

Environment

  • Red Hat OpenShift Container Platform (OCP) 4.7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content