Tuesday, 28 January 2020

Google Cloud - kubectl for Kubernetes app deployment

To deploy app in Kubernetes after creating cluster

+ Authenticate to the cluster:
gcloud container clusters get-credentials  kubecluster01

+ Deploy the hellow-server image from google sample
kubectl run hello-server --image gcr.io/google-samples/hello-app:1.0 --port 8080


+Enable load balance
kubectl expose deployment hello-server --type LoadBalancer --port 80 --target-port 8080 

>From Console you can see the same
Console > Kubernetes > Cluster >



>To login to the server Use the Endpoint of load balancer
> Kubernetes > Workloads > Exposing services

>

>