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

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
主站蜘蛛池模板: 仙居县| 隆尧县| 信宜市| 甘孜| 军事| 眉山市| 肥东县| 和政县| 彰化市| 聊城市| 邢台市| 淮南市| 云阳县| 都江堰市| 桐城市| 宜昌市| 绵阳市| 邵东县| 布尔津县| 闵行区| 洛南县| 宜兰市| 南宫市| 抚顺县| 偏关县| 高青县| 嘉义县| 新河县| 黔西| 淮安市| 平果县| 城步| 滦南县| 闸北区| 娱乐| 临城县| 洛川县| 普兰县| 罗平县| 博湖县| 裕民县|