diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c48d89201..6b38732d0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,10 @@ remove MetalK8s ISOs from a cluster (PR[#3730](https://github.com/scality/metalk8s/pull/3730)) +- Allow, from the Bootstrap configuration, to manage the maximum + number of pods that can be scheduled on each nodes + (PR[#3821](https://github.com/scality/metalk8s/pull/3821)) + ### Removals - The `Statefulsets` Grafana dashboard has been removed diff --git a/docs/installation/bootstrap.rst b/docs/installation/bootstrap.rst index 60b71e30d3..99ddfc5931 100644 --- a/docs/installation/bootstrap.rst +++ b/docs/installation/bootstrap.rst @@ -97,6 +97,9 @@ Configuration hard: [] soft: - topologyKey: kubernetes.io/hostname + kubelet: + config: + maxPods: 110 The ``networks`` field specifies a range of IP addresses written in CIDR notation for it's various subfields. @@ -269,6 +272,9 @@ defaults kubernetes configuration. deleting them. If it's set to 0, the terminated pod garbage collector is disabled (default to ``500``) + From ``kubelet`` section you can override the max number of pods that can + be scheduled on each nodes. + .. _Feature Gates: https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/ .. _specific OpenID for kube-apiserver: https://kubernetes.io/docs/reference/access-authn-authz/authentication/#openid-connect-tokens diff --git a/salt/metalk8s/kubernetes/kubelet/standalone.sls b/salt/metalk8s/kubernetes/kubelet/standalone.sls index 6758bbb828..f59145386e 100644 --- a/salt/metalk8s/kubernetes/kubelet/standalone.sls +++ b/salt/metalk8s/kubernetes/kubelet/standalone.sls @@ -94,6 +94,9 @@ Create kubelet config file: address: {{ grains['metalk8s']['control_plane_ip'] }} rotateCertificates: false port: 10250 + {%- if pillar.get("kubernetes:kubelet:config:maxPods") %} + maxPods: {{ pillar.kubernetes.kubelet.config.maxPods }} + {%- endif %} {%- for key, value in kubelet.config.items() %} {{ key }}: {{ value }} {%- endfor %}