I am trying to understand Deployment scaling with Load Balancer. I created Kubernetes cluster on Google Cloud with 6 nodes: 2 cores and 13Gb RAM each (n1-highmem-2) and launch 5 Pods and 1 Load Balancer service. Each Pod has a limit specified to 5.1Gb and 1cpu. When I tried to scale my deployment to 10 Pods I got an error that my CPU number is too low. How? I have cluster with 12 cores in total and 78Gb of RAM. Here is my yaml file:
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"