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
- declarative build instructions to build the Dockerfile via the container registry
- an alternative to
build-cloud-container-builder.sh, 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_NAMEis available on gcr.io for the current project
- 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
# Create cluster and get credentials first, see ASCIIcast # Wait a few minutes between each step. The scripts will check for their prerequsites # Instead of build-cloud-container-builder.sh, you can also use the gcr.io build triggers ./build-cloud-container-builder.sh ./deploy-on-kubernetes-engine.sh ./run-client-locally.sh
Don't forget to clean up your services, deployments and clusters.
Build image automatically via Cloud Container Builder
- Go to https://console.cloud.google.com/
- -> "Container Registry"
- -> "Build Triggers"
- Add a new build trigger and choose to use
cloudbuild.yamlfor build configuration
cloudbuild.yaml is possible, but not configured right now.