This tool deploys an application to a Kubernetes Engine cluster, following Google's recommended best practices.
gke-deploy to deploy an application to Kubernetes Engine differs from
kubectl in that
gke-deploy is a wrapper around a
deployment that follows Google's recommended best practices by...
Modifying a set of Kubernetes configuration files to use a container image's digest instead of a tag
Adding several recommended labels to the set of Kubernetes configuration files
Getting authorized to access a GKE cluster
Applying the set of Kubernetes configuration files that were modified in the prepare step, using
Waiting for applied Kubernetes configuration to be ready
This command executes all of the best practices mentioned above, in sequence.
This command executes the steps to modify and add labels to a set of Kubernetes configuration files, and skips the steps to get authorized to access a GKE cluster, apply configuration, and wait.
This command skips the steps to modify and add labels to a set of Kubernetes configuration files, and executes the steps to get authorized to access a GKE cluster, apply configuration, and wait.
View this page for examples on how to use
gke-deploy with Cloud Build.
Follow these instructions to set up continuous deployment.
gke-deploy is meant to be used as a build step with Cloud
Build, you can run it locally for testing.
kubectlas a dependency.
go install github.com/GoogleCloudPlatform/cloud-builders/gke-deploy gke-deploy -h
kubectlis pointing to a cluster, you can test out a deployment by deploying an application with one simple command:
# Deploy an nginx Deployment with a load balancer exposing port 80. gke-deploy run -i nginx -x 80
After the command finishes successfully,
gke-deploywill print a table displaying deployed resources. You can visit the IP address printed in the Service row.