Deploying to Kubernetes


The gcloud container command group lets you create and manage Google Kubernetes Engine containers and clusters.

Create cluster

gcloud container clusters create si-cluster \
 --zone us-central1-a --machine-type=e2-micro \
 --num-nodes 2

Connect and apply yaml file:

gcloud container clusters get-credentials si-cluster --zone us-central1-a
kubectl apply -f devops-deployment.yaml

Show the running pods:

kubectl get pods

Show all the deployments:

kubectl get deployments