/gcp-kubernetes-end-to-end-example

GCP Kubernetes example. Build Docker image and deploy it. Create LB service.

Primary LanguageDockerfile

GCP Kubernetes simple end-to-end example

First of all, create a GCP Kubernetes Engine cluster, and connect to the cluster

Build image with Cloud Build

Change proyect-name with your GCP proyect in the commands and in deployment.yaml Then execute the following commands

cd image
gcloud builds submit --tag gcr.io/proyect-name/kubernetes-end-to-end-example .
cd ..

Apply into kubernetes

kubectl apply -f deployment.yaml

Deploy LB

kubectl apply -f lb-service.yaml

Get info and LB ip

kubectl describe service end-to-end-example-lb

Then check the ip in a browser. It should say 'Hello World'

Delete pods and services

kubectl delete services end-to-end-example-lb
kubectl delete deployment end-to-end-example