【发布时间】:2019-11-07 14:58:40
【问题描述】:
我正在尝试了解使用负载均衡器进行部署扩展。我在谷歌云上创建了 Kubernetes 集群,有 6 个节点:2 个内核和 13Gb RAM(n1-highmem-2),并启动了 5 个 Pod 和 1 个负载均衡器服务。每个 Pod 都有一个指定为 5.1Gb 和 1cpu 的限制。当我尝试将我的部署扩展到 10 个 Pod 时,我收到一个错误,即我的 CPU 数量太低。如何?我的集群总共有 12 个内核和 78Gb 的 RAM。这是我的 yaml 文件:
apiVersion: v1
kind: Namespace
metadata:
name: production
labels:
name: production
---
apiVersion: v1
kind: Service
metadata:
name: my-service
namespace: production
labels:
run: mypod
spec:
type: LoadBalancer
ports:
- port: 8050
targetPort: 8050
protocol: TCP
name: http
selector:
run: mypod
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: test
namespace: production
spec:
selector:
matchLabels:
run: mypod
replicas: 5
template:
metadata:
namespace: production
labels:
run: mypod
spec:
containers:
- name: test
image: my-hello-world
ports:
- containerPort: 8050
resources:
limits:
cpu: "1"
memory: "5.1Gi"
requests:
cpu: "1"
memory: "500Mi"
【问题讨论】:
标签: kubernetes google-kubernetes-engine