title: Python gcloud clusters get-credentials returns permission error
body: <p>I'm working on a Python(3.6) project in which I have implemented Google cloud apis, I have setup credentials for Google Cloud via service account.
  Here's what I have tried:</p>
  
  <blockquote>
    <p>Obtain Credentials:</p>
  </blockquote>
  
  <pre><code>def prepare_credentials(cred_file):
      from google.oauth2 import service_account
      credentials = service_account.Credentials.from_service_account_file(cred_file)
      return credentials
  </code></pre>
  
  <p>And then I have tried to run <code>gcloud container clusters get-credentials $CLUSTER_NAME --zone $ZONE --project $PROJECT</code>
  as below:</p>
  
  <blockquote>
    <p>Run gcloud command via Python's Subprocess:</p>
  </blockquote>
  
  <pre><code>print(subprocess.call(
              'gcloud container clusters get-credentials ' + data['cluster_name'] + ' --zone '
              + data['zone_region']
              + ' --project ' + data['project_id'],
              shell=True))
  </code></pre>
  
  <p>it returns this error:</p>
  
  <blockquote>
    <p>Fetching cluster endpoint and auth data.</p>
    
    <p>ERROR: (gcloud.container.clusters.get-credentials) ResponseError: code=403, message=Required "container.clusters.get" permission for "projects/brain-183103/zones/europe-west1-d/clusters/numpy".</p>
    
    <p>1</p>
    
    <p>W0629 04:12:00.776926    2222 factory_object_mapping.go:423] Failed to download OpenAPI (Get <a href="https://104.197.10.169/swagger-2.0.0.pb-v1" rel="nofollow noreferrer">https://104.197.10.169/swagger-2.0.0.pb-v1</a>: dial tcp 104.197.10.169:443: i/o timeout), falling back to swagger
    Unable to connect to the server: dial tcp 104.197.10.169:443: i/o timeout</p>
  </blockquote>
  
  <p>Service Account credentials are working well as I'm using these credentials for various other Google Cloud API calls and also I have set the <code>owner</code> permission to the project for this service_account.</p>
  
  <p>Have I configured something wrong?</p>
  
  <p>Help me, please!</p>
  
  <p>Thank You,
  Abdul</p>