官术网_书友最值得收藏!

The guestbook application in action

Type the public IP on your favorite browser. You should get the following screenshot:

Go ahead, record your messages. It will be saved. Go crazy, open another browser and type the same IP; you will see all the messages you typed.

Congratulations, you have completed your first fully-deployed, multi-tier, cloud-native Kubernetes application!

The frontend did not show up on our first try. It turned out for the small machines we were using. Kubernetes was not able to schedule three replicas of the frontend. We had to download the  frontend-deployment.yaml file and change the replicas to 1 and also reduce the CPU task. The problem was discovered by typing
kubectl get events

Alas, the preceding method of deploying has become obsolete already. We needed to give it a try for these reasons: 

  • For prototyping, you probably will start from one of those yaml files.
  • The basic concepts of Deployment, Replica Sets, Services, and Pods do not change and need to be understood in detail.
  • The obsolete part is not true at all.

Still, to conserve resources on our free trial virtual machines, it is better to delete the deployments we made to run the next round of the deployment by using the following commands:

kubectl delete deployment -l app=redis
kubectl delete service -l app=redis
kubectl delete deployment -l app=guestbook
kubectl delete service -l app=guestbook
主站蜘蛛池模板: 红原县| 瓦房店市| 大埔区| 洱源县| 阜平县| 嵩明县| 桂东县| 缙云县| 临高县| 九龙城区| 土默特右旗| 邮箱| 连云港市| 德保县| 平昌县| 桐庐县| 瑞丽市| 三原县| 鄂尔多斯市| 棋牌| 天台县| 四会市| 七台河市| 亳州市| 左权县| 信阳市| 砚山县| 赞皇县| 道真| 土默特左旗| 鄂尔多斯市| 南木林县| 长武县| 晋州市| 溧阳市| 凤翔县| 汾阳市| 安龙县| 东乌珠穆沁旗| 剑川县| 高碑店市|