title: GCS with GKE, 403 Insufficient permission for writing into GCS bucket
body: <p>Currently I'm trying to write files into Google Cloud Storage bucket. For this, I have used <a href="https://django-storages.readthedocs.io/en/latest/" rel="noreferrer">django-storages</a> package. </p>
  
  <p>I have deployed my code and I get into the running container through kubernetes <code>kubectl</code> utility to check the working of GCS bucket.</p>
  
  <pre><code>$ kubectl exec -it foo-pod -c foo-container --namespace=testing python manage.py shell
  </code></pre>
  
  <p>I can able to read the bucket but if I try to write into the bucket, it shows the below traceback. </p>
  
  <pre><code>&gt;&gt;&gt; from django.core.files.storage import default_storage
  &gt;&gt;&gt; f = default_storage.open('storage_test', 'w')
  &gt;&gt;&gt; f.write('hi')
  2
  &gt;&gt;&gt; f.close()
  Traceback (most recent call last):
    File "/usr/local/lib/python3.6/site-packages/google/cloud/storage/blob.py", line 946, in upload_from_file
      client, file_obj, content_type, size, num_retries)
    File "/usr/local/lib/python3.6/site-packages/google/cloud/storage/blob.py", line 867, in _do_upload
      client, stream, content_type, size, num_retries)
    File "/usr/local/lib/python3.6/site-packages/google/cloud/storage/blob.py", line 700, in _do_multipart_upload
      transport, data, object_metadata, content_type)
    File "/usr/local/lib/python3.6/site-packages/google/resumable_media/requests/upload.py", line 98, in transmit
      self._process_response(result)
    File "/usr/local/lib/python3.6/site-packages/google/resumable_media/_upload.py", line 110, in _process_response
      response, (http_client.OK,), self._get_status_code)
    File "/usr/local/lib/python3.6/site-packages/google/resumable_media/_helpers.py", line 93, in require_status_code
      status_code, u'Expected one of', *status_codes)
  google.resumable_media.common.InvalidResponse: ('Request failed with status code', 403, 'Expected one of', &lt;HTTPStatus.OK: 200&gt;)
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "&lt;console&gt;", line 1, in &lt;module&gt;
    File "/usr/local/lib/python3.6/site-packages/storages/backends/gcloud.py", line 75, in close
      self.blob.upload_from_file(self.file, content_type=self.mime_type)
    File "/usr/local/lib/python3.6/site-packages/google/cloud/storage/blob.py", line 949, in upload_from_file
      _raise_from_invalid_response(exc)
    File "/usr/local/lib/python3.6/site-packages/google/cloud/storage/blob.py", line 1735, in _raise_from_invalid_response
      raise exceptions.from_http_response(error.response)
  google.api_core.exceptions.Forbidden: 403 POST https://www.googleapis.com/upload/storage/v1/b/foo.com/o?uploadType=multipart: Insufficient Permission
  &gt;&gt;&gt; default_storage.url('new docker')
  'https://storage.googleapis.com/foo.appspot.com/new%20docker'
  &gt;&gt;&gt;
  </code></pre>
  
  <p>Seems like it was completely related to the bucket permissions. So I have assigned Storage admin , Storage object creator roles to google cloud build service account (through bucket -> manage permissions) but still it shows the same error.</p>