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.9.2.10. 使用不同服务帐户运行 Pod
您可以使用非默认服务帐户运行 pod:
编辑部署配置:
oc edit dc/<deployment_config>
$ oc edit dc/<deployment_config>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 将
serviceAccount
和serviceAccountName
参数添加到spec
字段,再指定您要使用的服务帐户:spec: securityContext: {} serviceAccount: <service_account> serviceAccountName: <service_account>
spec: securityContext: {} serviceAccount: <service_account> serviceAccountName: <service_account>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow