Kubernetes In Google Cloud

Let’s run our first containers cluster using Docker in Google’s Kubernetes Engine.

Rafael Escoto
Aug 31 · 4 min read
Docker and GKE

What is Kubernetes?


Let’s Take It For a Spin

$> gcloud container clusters create mykotlinapicluster --zone europe-west3-a --num-nodes 2
$> gcloud compute instances list
2 compute instances as specified in the clusters create command.
$> kubectl version
$> kubectl create deploy kotlinresthello --image=escoto/kotlinresthello
$> kubectl get pods
$> kubectl expose deployment kotlinresthello --port 8080 --type LoadBalancer
$> kubectl get services
This is a random IP generated for on-demand — I will shootdown this afterward, so, don't expect my service to be up by the time you read this.
$> kubectl scale deployment kotlinresthello --replicas 3
$> kubectl get pods
If we list out pods, you can see the first created pod, and the 2 newly created.
$> gcloud container clusters delete mykotlinapicluster --zone europe-west3-a



Everything connected with Tech & Code. Follow to join our 500K+ monthly readers