<p>I'm able to create a GKE cluster using the golang container lib <a href="https://godoc.org/google.golang.org/api/container/v1" rel="nofollow noreferrer">here</a>. 
Now for my golang k8s client to be able to deploy my k8s deployment files there, I need to get the kubeconfig from the GKE cluster. However I can't find the relevant api for that in the <strong>container</strong> lib above. Can anyone please point out what am I missing ?</p>

<p>As per @Subhash suggestion I am posting the answer from <a href="https://stackoverflow.com/questions/56191900/is-there-a-golang-sdk-equivalent-of-gcloud-container-clusters-get-credentials/56192493#56192493">this</a> question:</p>

<blockquote>
  <p>The GKE API does not have a call that outputs a kubeconfig file (or
  fragment). The specific processing between fetching a full cluster
  definition and updating the kubeconfig file are implemented in python
  in the gcloud tooling. It isn't part of the Go SDK so you'd need to
  implement it yourself. </p>
  
  <p>You can also try using <code>kubectl config set-credentials</code> (see
  <a href="https://github.com/ahmetb/kubernetes.github.io/blob/master/docs/user-guide/kubectl/kubectl_config_set-credentials.md" rel="nofollow noreferrer">this</a>)  and/or see if you can vendor the libraries that implement
  that function if you want to do it programmatically.</p>
</blockquote>
