亚马逊 EKS 入门:在亚马逊 AWS 上使用 Kubernetes 运行 Docker,尝试体验④
首先
在本篇文章中,我们将介绍Stephane Maarek在Udemy上提供的《Amazon EKS入门:在AWS EKS上使用Kubernetes进行Docker》课程。
上一篇文章我们学习了Kubernetes控制面板的部署方法。本次我们将创建无状态应用。
请参考以下链接查看过去的文章。
亚马逊EKS入门版:在AWS EKS上使用Kubernetes的Docker体验①
亚马逊EKS入门版:在AWS EKS上使用Kubernetes的Docker体验②
亚马逊EKS入门版:在AWS EKS上使用Kubernetes的Docker体验③
部署和检查一个无状态的应用程序

フロントエンド:PHP App
AWS ELB(パブリック ELB)
複数の Slave DB で読み込みの冗長化
シングル Master DB に書き込みリクエスト
バックエンド:Redis
シングル Master Pod(書き込み)
マルチ Slave Pods(読み込み)
Master と継続的に同期する複数の Slave を用意
后端部署

-
- Redis Master pod
-
- Redis Master service
-
- Redis Slave pods
- Redis Slave service




前端部署


-
- サービス名:frontend
- タイプ :LoadBalancer
然後,您可以查看前端服務的信息。

调整我们的Pod大小
那么,接下来我们来试试对 Pod 进行扩展和缩减。
扩大规模

缩小规模





K8s的自愈机制
最后,我想简单介绍K8s的自动修复功能。



最后
关于无状态应用(stateless app)就介绍到这里。这次我们分别创建了后端和前端环境,以便于创建无状态应用。下次我们将介绍如何使用Amazon EFS进行应用搭建等内容。