Google Cloud Platform

[GKE] Deploying an application to the cluster

nockdoo 2020. 5. 19. 21:43

gcloud config set compute/zone us-central1-a

 

gcloud container clusters create [CLUSTER-NAME]

 

kubectl create deployment hello-server --image=gcr.io/google-samples/hello-app:1.0

 

kubectl expose deployment hello-server --type=LoadBalancer --port 8080

 

kubectl get service

 

Access : http://[EXTERNAL-IP]:8080

 

gcloud container clusters delete [CLUSTER-NAME]

'Google Cloud Platform' 카테고리의 다른 글

[GKE] kubectl port-forward  (0) 2020.05.21
[GKE] Deploying Nginx on GKE  (0) 2020.05.19
[VM] add new disk  (0) 2020.05.10
[VM] run startup script, shutdown script  (0) 2020.05.10
[Storage] gsutil  (0) 2020.05.10