Did you already log in as user test? Only a cluster admin can give that
role to another user, so you need to run that command as the bootstrap
cluster admin user. The credentials for that user are in the
admin.kubeconfig file on the API server.

oadm policy add-cluster-role-to-user cluster-admin test
--config=/path/to/admin.kubeconfig





On Sun, Jul 17, 2016 at 9:41 PM, 周华康 <[email protected]> wrote:

> Hi,
>
> Backgroud:
> 1.I install the Openshift Origin via the second method,"Method 2:
> Downloading the Binary"
> 2.Then I found that there is no Default Template in the cluster
> 3.So I decide to install-config-imagestreams-templates[1].
> 4.But I found that I need to be the role "*cluster-admin*"
> Question:
> 1.How to set a user to be the role "cluster admin"
> 2.What is command?
> 3.I have try the command "oadm policy add-cluster-role-to-user <role>
> <username>",but there is error in the CLI "Error from server: User "test"
> cannot get clusterpolicybindings at the cluster scope"[2]
>
>
> [1]
> https://docs.openshift.org/latest/install_config/imagestreams_templates.html#install-config-imagestreams-templates
> [2]
>
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>
>

Attachment: [email protected]
Description: Binary data

_______________________________________________
users mailing list
[email protected]
http://lists.openshift.redhat.com/openshiftmm/listinfo/users

Reply via email to