Red Hat Training
A Red Hat training course is available for OpenShift Container Platform
9.2.11. 使用不同服务帐户运行 Pod
您可以使用非默认服务帐户运行 pod:
编辑部署配置:
$ oc edit dc/<deployment_config>
将
serviceAccount和serviceAccountName参数添加到spec字段,再指定您要使用的服务帐户:spec: securityContext: {} serviceAccount: <service_account> serviceAccountName: <service_account>