Red Hat Training

A Red Hat training course is available for OpenShift Container Platform

9.2.11. 使用不同服务帐户运行 Pod

您可以使用非默认服务帐户运行 pod:

  1. 编辑部署配置:

    $ oc edit dc/<deployment_config>
  2. serviceAccountserviceAccountName 参数添加到 spec 字段,再指定您要使用的服务帐户:

    spec:
      securityContext: {}
      serviceAccount: <service_account>
      serviceAccountName: <service_account>