<p>I am trying to create a Service Account with 'roles/container.admin' and i get an error saying that the role is not supported for this resource.</p>

<pre><code>$ gcloud iam service-accounts add-iam-policy-binding sa-ci-vm@PROJECT-ID.iam.gserviceaccount.com --member='serviceAccount:sa-ci-vm@PROJECT-ID.iam.gserviceaccount.com' --role='roles/container.admin'

ERROR: (gcloud.iam.service-accounts.add-iam-policy-binding) INVALID_ARGUMENT: Role roles/container.admin is not supported for this resource.
</code></pre>

<p>If I create a Service Account from the CONSOLE UI I can add this role without a problem.</p>

<p>You have to use <code>gcloud projects</code> to add roles for a service account at a project level as shown <a href="https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource" rel="noreferrer">here</a>.</p>

<p>This works for me:</p>

<pre><code>gcloud projects add-iam-policy-binding PROJECT_ID \ 
--member serviceAccount:sa-ci-vm@PROJECT-ID.iam.gserviceaccount.com \
--role roles/container.admin
</code></pre>
