"no RBAC policy matched" error when creating a CronJob
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.