15. 動作確認とPodの起動
#動作確認
kubectl get node
kubectl get all --all-namespaces
#Podの起動
kubectl run hello-world --
image=gcr.io/google-samples/node-
hello:1.0 --port=8080
kubectl expose deployment hello-
world --type=NodePort
16. デモアプリの動作確認
#Podの動作確認
kubectl get svc --field-selector
metadata.name=hello-world
#Podへのアクセス確認
IPxx.xx.xx.xxの上記待ち受けポート(例では
30048)にブラウザでアクセス
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
hello-world NodePort xx.xx.xx.xx <none> 8080:30048/TCP 53s
17. アプリとPodの停止
#アプリの停止
kubectl delete service hello-world
kubectl get svc --field-selector
metadata.name=hello-world
kubectl get all
#Podの停止
kubectl delete deployment hello-world
kubectl get all