How to create a local custom role in OpenShift and apply it to a user within a namespace

Solution In Progress - Updated -

Issue

  • Need to create a local custom role and apply it to a user within a namespace

  • After following Managing authorization policy creating a local role instructions for creating a local custom role while executing oadm policy add-role-to-user -n this error is shown:

oadm policy add-role-to-user <role-name> <user> -n <namespace>
Error from server: role "<role-name>" not found

Environment

OpenShift 3.x

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