<p>I manage a couple (presently, but will increase) clusters at GKE and up till now have been ok launching things manually as needed.  I've started working my own API that can take in requests to spin up new resources on-demand for a specific cluster but in order to make it scalable I need to do something more dynamic than switching between clusters with each request.  I have found a link for a Google API python client that supposedly can access GKE:</p>

<p><a href="https://developers.google.com/api-client-library/python/apis/container/v1#system-requirements" rel="nofollow noreferrer">https://developers.google.com/api-client-library/python/apis/container/v1#system-requirements</a></p>

<p>I've also found several other clients (specifically one I was looking closely at was the nodejs client from godaddy) that can access Kubernetes:</p>

<p><a href="https://github.com/godaddy/kubernetes-client" rel="nofollow noreferrer">https://github.com/godaddy/kubernetes-client</a></p>

<p>The Google API Client doesn't appear to be documented for use with GKE/kubectl commands, and the godaddy kubernetes-client has to access a single cluster master but can't reach one at GKE (without a kubectl proxy enabled first).  So my question is, how does one manage kubernetes on GKE programmatically without having to use the command-line utilities in either nodejs or python?</p>

<p>I know this question is a couple of years old, but hopefully this helps someone. Newer GKE APIs are available for Node.js here: <a href="https://cloud.google.com/nodejs/docs/reference/container/0.3.x/" rel="nofollow noreferrer">https://cloud.google.com/nodejs/docs/reference/container/0.3.x/</a></p>

<p>See list of container APIs here: <a href="https://developers.google.com/apis-explorer/#p/container/v1/" rel="nofollow noreferrer">https://developers.google.com/apis-explorer/#p/container/v1/</a></p>

<p>Once connected via the API, you can access cluster details, which includes the connectivity information for connecting to the master with standard API calls.</p>
