This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.1.2. Creating a project as another user
Impersonation allows you to create a project as a different user.
1.2.1. API impersonation 复制链接链接已复制到粘贴板!
You can configure a request to the OpenShift Container Platform API to act as though it originated from another user. For more information, see User impersonation in the Kubernetes documentation.
1.2.2. Impersonating a user when you create a project 复制链接链接已复制到粘贴板!
You can impersonate a different user when you create a project request. Because system:authenticated:oauth
is the only bootstrap group that can create project requests, you must impersonate that group.
Procedure
To create a project request on behalf of a different user:
oc new-project <project> --as=<user> \ --as-group=system:authenticated --as-group=system:authenticated:oauth
$ oc new-project <project> --as=<user> \ --as-group=system:authenticated --as-group=system:authenticated:oauth
Copy to Clipboard Copied! Toggle word wrap Toggle overflow