[root@master-01 ~]# kubectl apply -f bookinfo.yaml -n tnmk service/details created serviceaccount/bookinfo-details created deployment.apps/details-v1 created service/ratings created serviceaccount/bookinfo-ratings created deployment.apps/ratings-v1 created service/reviews created serviceaccount/bookinfo-reviews created deployment.apps/reviews-v1 created deployment.apps/reviews-v2 created deployment.apps/reviews-v3 created service/productpage created serviceaccount/bookinfo-productpage created deployment.apps/productpage-v1 created
确认所有的服务和 Pod 都已经启动
[root@master-01 ~]# kubectl get services -n tnmk NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE details ClusterIP 172.101.98.173 <none> 9080/TCP 112s productpage ClusterIP 172.101.139.235 <none> 9080/TCP 112s ratings ClusterIP 172.101.24.172 <none> 9080/TCP 112s reviews ClusterIP 172.101.40.212 <none> 9080/TCP 112s [root@master-01 ~]# kubectl get pods -n tnmk NAME READY STATUS RESTARTS AGE details-v1-7d88846999-hggx9 2/2 Running 0 3m23s productpage-v1-7795568889-tqjrv 2/2 Running 0 3m23s ratings-v1-754f9c4975-tqrqj 2/2 Running 0 3m23s reviews-v1-55b668fc65-nns2c 2/2 Running 0 3m23s reviews-v2-858f99c99-l8vv5 2/2 Running 0 3m23s reviews-v3-7886dd86b9-wpkkl 2/2 Running 0 3m23s
要确认 Bookinfo 应用是否正在运行,请在某个 Pod 中用 curl 命令对应用发送请求,例如 ratings: