Hello World from OSS Silicon Valley
HowToUse/Kubernetes/1.12
_ Prerequisite
- Gmail account creation
_ Install&Setup
- Step.1
- XXX
_ HowToUse
_ Deployment
- 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
- 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
- Step.1
$ kubectl get dployments -o yaml <Deploy Name>
_ Author
S.Yatsuzuka
[ back ]
Last-modified: 2019-08-25 (Sun) 02:57:03 (2007d)