Skip to content

Instantly share code, notes, and snippets.

@sjlu sjlu/notes.md
Created Oct 19, 2015

Embed
What would you like to do?
Kubernetes and Google Container Engine cheatsheet

Setting project:

gcloud config set project tidy-bindery-110323

Creating a cluster:

gcloud container clusters create web --num-nodes=1 --machine-type=g1-small --zone=us-east1-b

Running a service:

kubectl run web --image=gcr.io/tidy-bindery-110323/web --port=8080

To expose the service through a load balancer:

kubectl expose rc web --create-external-load-balancer=true --port=80 --target-port=8080

Get IPs

kubectl get services web

To delete the load balancer:

kubectl delete services -l run=web

Updating a replication controller:

kubectl rolling-update web --image=web:6f7b0aff285f792f4757d703b54ddf34f4bede87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.