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.2.2. 以其他用户身份创建项目
通过身份模拟功能,您可以其他用户的身份创建项目。
2.2.1. API 身份模拟(impersonation) 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
您可以配置对 OpenShift Container Platform API 的请求,使其表现为像是源自于另一用户。如需更多信息,请参阅 Kubernetes 文档中的用户身份模拟。
2.2.2. 在创建项目时模拟用户 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
您可在创建项目请求时模拟其他用户。由于 system:authenticated:oauth
是唯一能够创建项目请求的 bootstrap 组,因此您必须模拟这个组。
流程
代表其他用户创建项目请求:
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