Max pods per node

9/17/2019

Dear members of stackoverflow,

It is possible to configure the maximum number of pods per node in the yaml configuration file of a kubernetes deployment? For example something as

---
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
  name: cdn-akamai-pipe
spec:
  template:
    metadata:
      labels:
        app: cdn-akamai-pipe
    max-pods-per-node: 10 

Thanks

-- Juan
kubernetes

2 Answers

9/17/2019

Maximum number of pods should be set on Kubelet and not in deployment yaml

--max-pods int32

Number of Pods that can run on this Kubelet. (default 110)

-- P Ekambaram
Source: StackOverflow

9/17/2019

This is a kubelet setting that can be set using the --max-pods flag, https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/#kubelet as such there is no way to set this using yaml configuration. If you are using a managed service this can generally be set during cluster creation

-- Spazzy757
Source: StackOverflow