Hello World from OSS Silicon Valley


HowToUse/Kubernetes/1.12


#contents

*Prerequisite [#nbabb0ce]
-Gmail account creation

*Install&Setup [#k7901b76]
:Step.1|
XXX

*HowToUse [#n148deb8]
**Deployment [#ld5bdf8f]

:Step.1|
Deploy application

 $ kubectl run <Deployment Name> --image <Image Name> --port <PortNum>

(example)

 $ kubectl run hello-server --image gcr.io/google-samples/hello-app:1.0 --port 8080

:Step.2|
Expose application

 $ kubectl expose deployment <Deploy Name> --type "LoadBalancer"

(example)

 $ kubectl expose deployment hello-server --type "LoadBalancer"

:Step.3|
Check external IP and access to the application

 $ kubectl get service <Deploy Name>

(example)

 $ kubectl get service hello-server

Then you should be able to access deployed application from the following URL.

http://<External IP>:8080


**Resize [#d84b72bd]
:Step.1|
You can stop/start service by changing the number of node.

(stop)
 $ gcloud container clusters resize <Cluster Name> --size=0

(restart)
 $ gcloud container clusters resize <Cluster Name> --size=3 --zone us-west1-a

**Check Deployment [#k071c619]
:Step.1|

 $ kubectl get dployments -o yaml <Deploy Name>

*Author [#qcfe4043]
S.Yatsuzuka

#back(back,center,0)