Playground for Kubernetes Engine on Google Cloud Platform
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Deploying TensorFlask on Kubernetes Engine

  • A Dockerfile for TensorFlask

  • A set of scripts to deploy the resulting Docker image to GCP Kubernetes Engine



    • script to build the Dockerfile via the Google Cloud Container Builder
  • cloudbuild.yaml

    • declarative build instructions to build the Dockerfile via the container registry
    • an alternative to, to be used via a build trigger (see below)

    • shared environment variables

    • create a TensorFlask deployment and LoadBalancer service on an existing Kubernetes Engine cluster
    • requires (and checks) that the current $IMAGE_NAME is available on for the current project
  • Dockerfile

    • the Dockerfile for TensorFlask
    • automatically runs the server on container start, unless overriden
    • exposes port 8000

    • runs the TensorFlask client locally against the deployed and exposed tensorflask instance
    • requires (and checks) that the LoadBalancer service is up and running

General flow

# Create cluster and get credentials first, see ASCIIcast

# Wait a few minutes between each step. The scripts will check for their prerequsites

# Instead of, you can also use the build triggers



Don't forget to clean up your services, deployments and clusters.

Build image automatically via Cloud Container Builder

  • Go to
  • -> "Container Registry"
  • -> "Build Triggers"
  • Add a new build trigger and choose to use cloudbuild.yaml for build configuration

Deployment via cloudbuild.yaml is possible, but not configured right now.

ASCIIcast of some concepts used here