2016-09-17

Accessing Kubernetes API on Google Container Engine

This blog post answers the question about how to access the Kubernetes API on Google Container Engine. I'll demonstrate how to create a cluster and display the list of nodes using:

  1. web browser
    • create a cluster manually using the web GUI
    • display the list of nodes in Kubernetes web GUI
  2. command-line
    • create a cluster use the gcloud CLI
    • display the list of nodes using kubectl CLI
  3. web API
    • create a cluster using the Container Engine API
    • list the nodes using the Kubernetes API
Here is the 15 minute video demonstration:



The golang code I put together for this demo is in the kubernetes-api-on-gce branch. I even made sure it builds on Travis CI. Prior to putting this video together, I installed the gcloud sdk, created a project named ctaggartcom, created a default network named default, and:
  • gcloud auth login
  • gcloud config set project ctaggartcom
The proxy I used was mitmproxy. It is easy to install on a Mac with:
  • brew install mitmproxy