Google Cloud Kubernetes Basic Commands To Deploy An Application:

  1. First create a Kubernetes Cluster K1

gcloud container clusters create k1


2. Deploy an app from google container registry

kubectl run app –image


3. You can see the deployment status using the below command

  kubectl get pods


4 Now scale up replicas to 4 using the below command

kbectl scale deployment app –replicas 4


5. Verify the replica status using the command kubectl get podsK1-4

6. Now expose your app to the world by exposing the port 80

kubectl expose deployment app –port 80 –type=loadbalancer


7. Now verify the website using cluster public IP


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s