我想尝试在AWS中为包含以下内容的应用程序设置Kubernetes集群:
已选择AWS代替GCE,因为其他服务,例如S3,已经在使用。目前,应用程序是使用Jelastic(https://jelastic.com/ - GUI进行集群管理)设置的,但是Jelastic由于缺乏自动化工具而不再足够,而且硬件提供商也有很多停机。
Jelastic使用 cloudlets 作为计算机资源的抽象 - 一个cloudlet是200MHz CPU和128MB RAM。该应用程序使用大约150个cloudlet = 30 GHz CPU + 20GB RAM。
您如何建议在AWS中设置群集?哪些实例类型最适合Kubernetes主人和小兵?您是否建议在群集和服务上运行数据库,还是为它们启动专用实例更好?
答案 0 :(得分:0)
您能否提供有关您的用例和自动化的更多信息? 在Jelastic中有一个名为CloudScripting的自动化工具,借助于此可以实现任何类型的自动化。
答案 1 :(得分:0)
微调aws实例类型需要一些试验&如果你在启动kube-up.sh
之前定义了这些环境变量,那么对于初学者来说是错误的export MASTER_SIZE=t2.large # master instance type
export NODE_SIZE=t2.large # minion instance type
export NUM_NODES=3 # determines number of minion instances
然后一旦密切读取输出以调用
kubectl describe nodes
...典型输出
Namespace Name CPU Requests CPU Limits Memory Requests Memory Limits
--------- ---- ------------ ---------- --------------- -------------
kube-system elasticsearch-logging-v1-rvvnw 100m (5%) 100m (5%) 0 (0%) 0 (0%)
kube-system elasticsearch-logging-v1-ybz5n 100m (5%) 100m (5%) 0 (0%) 0 (0%)
kube-system fluentd-elasticsearch-ip-172-20-0-211.ec2.internal 100m (5%) 0 (0%) 200Mi (5%) 200Mi (5%)
kube-system heapster-v1.1.0-1261016182-q18fr 288m (14%) 288m (14%) 598916Ki (14%) 598916Ki (14%)
kube-system kibana-logging-v1-9337e 100m (5%) 100m (5%) 0 (0%) 0 (0%)
kube-system kube-dns-v17-iits3 110m (5%) 110m (5%) 120Mi (3%) 220Mi (5%)
kube-system kube-proxy-ip-172-20-0-211.ec2.internal 100m (5%) 0 (0%) 0 (0%) 0 (0%)
kube-system kubernetes-dashboard-v1.1.0-ss59o 100m (5%) 100m (5%) 50Mi (1%) 50Mi (1%)
kube-system monitoring-influxdb-grafana-v3-lzjq7 200m (10%) 200m (10%) 600Mi (15%) 600Mi (15%)
ruptureofthemundaneplane loudspeed-deployment-3003771997-bybrm 0 (0%) 0 (0%) 0 (0%) 0 (0%)
ruptureofthemundaneplane mongo-deployment-2286179029-0bltg 0 (0%) 0 (0%) 0 (0%) 0 (0%)
Allocated resources:
(Total limits may be over 100%, i.e., overcommitted. More info: http://releases.k8s.io/HEAD/docs/user-guide/compute-resources.md)
CPU Requests CPU Limits Memory Requests Memory Limits
------------ ---------- --------------- -------------
1198m (59%) 998m (49%) 1592196Ki (39%) 1694596Ki (41%)
以上重点关注底层的资源使用百分比值
https://aws.amazon.com/ec2/instance-types/
https://aws.amazon.com/ec2/pricing/
调整以实现最小/最便宜的实例类型,而不会获得过高的使用百分比值