<p>Can we create credentials.json file using gcloud auth login? Requirement is -  user should use personal  account in the minikube and use cred.json file as a secret in their cluster.
Current setup - For QA we have a service account key which get mounted on the gke cluster as secret.</p>

<p>To access to google cloud API, you need an OAuth2 access_token and you can generate it with user credential (and after a <code>gcloud auth login</code>)</p>
<p>So, you can call <a href="https://cloud.google.com/sdk/gcloud/reference/iam/service-accounts/keys/create" rel="nofollow noreferrer">this command</a> or directly <a href="https://cloud.google.com/iam/docs/reference/rest/v1/projects.serviceAccounts.keys/create" rel="nofollow noreferrer">the API</a> with an access token in parameter</p>
<p><em>Example with curl</em></p>
<pre><code>curl -H &quot;Authorization: Bearer $(gcloud auth print-access-token)&quot; 
</code></pre>
<p><strong>EDIT</strong></p>
<p>As explained before, a user credential created with <code>gcloud auth login</code> can only, today, create an access_token.</p>
<p>Access token are required to access to Google API (included Google Cloud products). If it's your use case, you can use it.</p>
<p>However, if you need an id_token, for example to access to private Cloud Functions, private Cloud Run, App Engine behind IAP, you can't (not directly, I have a fix for this if you want).</p>
