title: Is there a better workflow for switching accounts with gcloud and kubectl?
body: <p>I have several gcloud accounts and thus different kubernetes' contexts.  </p>
  
  <p>I find myself frequently switching between these using:</p>
  
  <pre><code>$ gcloud config configurations activate ACCOUNT
  $ kubectl config set-context CONTEXT
  </code></pre>
  
  <p>or alternatively</p>
  
  <pre><code>$ gcloud config configurations activate ACCOUNT
  $ kubectx CONTEXT
  </code></pre>
  
  <p>(for kubectx see <a href="https://github.com/ahmetb/kubectx" rel="nofollow noreferrer">https://github.com/ahmetb/kubectx</a>)</p>
  
  <p>This feels like a lot of typing.  Also it also seems like if you switch gcloud accounts, that it could intuitively switch the contexts (each k8s context maps to a gcloud account).  </p>
  
  <p>I'm curious to see other people's workflows.  Or is there a more efficient 
  or conventional workflow?  </p>
  
  <hr>
  
  <p>The reason I need to switch both account and context is because each gcloud account has a separate email address.  So I'll get this error if I don't switch both:</p>
  
  <pre><code>$ kubectl get pods          
  Error from server (Forbidden): pods is forbidden: User 
  "myemail@email.com" cannot list resource "pods" in API group "" in 
  the namespace "default": Required "container.pods.list" permission.
  </code></pre>
  
  <p>Maybe there's a way to setup gcloud to allow both users in each account? 
  Otherwise I'd have to switch both account and contexts.</p>