# \[Solved\] Setting Max Pods

**URL:** <https://forums.suse.com/t/solved-setting-max-pods/11866>\
**Category:** SUSE Rancher Prime\
**Created:** [September 27, 2018, 9:35pm UTC](https://forums.suse.com/t/solved-setting-max-pods/11866 "2018-09-27T21:35:04Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![naisanza](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/naisanza/32/3120_2.png) [@naisanza](https://forums.suse.com/u/naisanza)\
**Post date:** [September 27, 2018, 9:35pm UTC](https://forums.suse.com/t/solved-setting-max-pods/11866/1 "2018-09-27T21:35:04Z")

</div>

How do you change the Max Pods after you have created a cluster?

How do you set the Max Pods before you create a new cluster?

At 110 max pods, it’s hit very quickly with plenty of hardware resources left for two or three folds more pods.

Update: See [superseb’s answer](http://forums.suse.com/t/solved-setting-max-pods/11866/4?u=naisanza)

Solution:

```auto
addon_job_timeout: 30
authentication: 
  strategy: "x509"
ignore_docker_version: true
# 
# # Currently only nginx ingress provider is supported.
# # To disable ingress controller, set `provider: none`
# # To enable ingress on specific nodes, use the node_selector, eg:
# provider: nginx
# node_selector:
# app: ingress
# 
ingress: 
  provider: "nginx"
kubernetes_version: "v1.11.3-rancher1-1"
monitoring: 
  provider: "metrics-server"
# 
# # If you are using calico on AWS
# 
# network:
# plugin: calico
# calico_network_provider:
# cloud_provider: aws
# 
# # To specify flannel interface
# 
# network:
# plugin: flannel
# flannel_network_provider:
# iface: eth1
# 
# # To specify flannel interface for canal plugin
# 
# network:
# plugin: canal
# canal_network_provider:
# iface: eth1
# 
network: 
  options: 
    flannel_backend_type: "vxlan"
  plugin: "canal"
# 
# services:
# kube_api:
# service_cluster_ip_range: 10.43.0.0/16
# kube_controller:
# cluster_cidr: 10.42.0.0/16
# service_cluster_ip_range: 10.43.0.0/16
# kubelet:
# cluster_domain: cluster.local
# cluster_dns_server: 10.43.0.10
# 
services: 
  etcd: 
    extra_args: 
      heartbeat-interval: 500
      election-timeout: 5000
    snapshot: false
  kube-api: 
    pod_security_policy: false
    service_node_port_range: "30000-32767"
  kubelet: 
    extra_args:
      max-pods: 500
ssh_agent_auth: false

```

---

<div class="post-metadata">

**Author:** ![superseb](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/superseb/32/2424_2.png) [@superseb](https://forums.suse.com/u/superseb)\
**Post date:** [September 28, 2018, 10:56pm UTC](https://forums.suse.com/t/solved-setting-max-pods/11866/2 "2018-09-28T22:56:09Z")

</div>

You can configure anything using [https://rancher.com/docs/rke/v0.1.x/en/config-options/](https://rancher.com/docs/rke/v0.1.x/en/config-options/) (specifically [https://rancher.com/docs/rke/v0.1.x/en/config-options/services/services-extras/#extra-args](https://rancher.com/docs/rke/v0.1.x/en/config-options/services/services-extras/#extra-args)) and [https://rancher.com/docs/rancher/v2.x/en/cluster-provisioning/rke-clusters/options/#config-file](https://rancher.com/docs/rancher/v2.x/en/cluster-provisioning/rke-clusters/options/#config-file)

---

<div class="post-metadata">

**Author:** ![naisanza](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/naisanza/32/3120_2.png) [@naisanza](https://forums.suse.com/u/naisanza)\
**Post date:** [September 29, 2018, 7:36am UTC](https://forums.suse.com/t/solved-setting-max-pods/11866/3 "2018-09-29T07:36:25Z")

</div>

I can’t seem to find any configuration flags for “max pods” or “max” and “pods”

---

<div class="post-metadata">

**Author:** ![superseb](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/superseb/32/2424_2.png) [@superseb](https://forums.suse.com/u/superseb)\
**Post date:** [October 1, 2018, 9:00pm UTC](https://forums.suse.com/t/solved-setting-max-pods/11866/4 "2018-10-01T21:00:57Z")

</div>

The parameter `extra_args` lets you add any argument to any service. Also see [https://github.com/rancher/docs/pull/851/files](https://github.com/rancher/docs/pull/851/files)

---

<div class="post-metadata">

**Author:** ![naisanza](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/naisanza/32/3120_2.png) [@naisanza](https://forums.suse.com/u/naisanza)\
**Post date:** [October 2, 2018, 6:09am UTC](https://forums.suse.com/t/solved-setting-max-pods/11866/5 "2018-10-02T06:09:45Z")

</div>

That was the perfect example. That was more clear than the links to the other documentation!

Thanks!

---

<div class="post-metadata">

**Author:** ![markusressel](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/markusressel/32/6899_2.png) [@markusressel](https://forums.suse.com/u/markusressel)\
**Post date:** [November 14, 2019, 12:58am UTC](https://forums.suse.com/t/solved-setting-max-pods/11866/6 "2019-11-14T00:58:56Z")

</div>

Well this seems to be the solution to my problem, but where the heck is this file located?? Can it be edited through the Rancher 2.x web interface? Do I have to edit a file locally on the node where Rancher is running?

I searched google for hours and cant seem to find the right way to do this 😭

**EDIT**  
Ok I finally found it. You can edit it though the Rancher 2.x web ui **but only using the yaml editor**. To do this:

- Open your cluster dashboard of choice
- Open Options […] -\> Edit
- Click the `Edit as YAML` button
- Find the `services` section
- Find the `kubelet` section
- Add the following to it:

```auto
  services:
    [...]
    kubelet:
      fail_swap_on: false
      [...]
      extra_args:
        max-pods: '250'

```

---

<div class="post-metadata">

**Author:** ![MrAmbiG](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/mrambig/32/7130_2.png) [@MrAmbiG](https://forums.suse.com/u/MrAmbiG)\
**Post date:** [May 11, 2020, 1:15pm UTC](https://forums.suse.com/t/solved-setting-max-pods/11866/7 "2020-05-11T13:15:55Z")

</div>

This is still a problem since you don’t get this option in imported clusters. When you go to edit cluster you only have  
member roles  
Labels and annotations. We have 1% memory used and 3% CPU used with 80% pod limit reached already. Very frustrating.

---

<div class="post-metadata">

**Author:** ![naisanza](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/naisanza/32/3120_2.png) [@naisanza](https://forums.suse.com/u/naisanza)\
**Post date:** [May 13, 2020, 6:20am UTC](https://forums.suse.com/t/solved-setting-max-pods/11866/8 "2020-05-13T06:20:43Z")

</div>

I’m not able to verify that, but that does sound frustrating

I’m in the process of deploying Rancher using rke + letsencrypt, but hitting a wall where the certificates aren’t properly created, or is in some staging phase

Not sure yet

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [May 13, 2020, 6:45am UTC](https://forums.suse.com/t/solved-setting-max-pods/11866/9 "2020-05-13T06:45:56Z")

</div>

Imported clusters are defined and managed by whatever created them, and you’d need to change the setting there. Rancher only has access to the resources “inside” of the cluster; it has no idea what created the “outside” of the cluster itself, doesn’t know how to change its configuration, and doesn’t have the credentials that may be needed to change it.

---

<div class="post-metadata">

**Author:** ![LiquiD](https://avatars.discourse-cdn.com/v4/letter/l/47e85d/32.png) [@LiquiD](https://forums.suse.com/u/LiquiD)\
**Post date:** [June 22, 2020, 10:00am UTC](https://forums.suse.com/t/solved-setting-max-pods/11866/10 "2020-06-22T10:00:53Z")

</div>

Is there a way to go past 250 pods per node?  
It would be awesome to have 500 pods per nodes so I can utilize the full cluster performance. Kinda dont know how to change the podCIDRs from 10.x.x.x/24 to 10.x.x.x/20 inside a imported RKE cluster.

---

<div class="post-metadata">

**Author:** ![dstuart](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/dstuart/32/5598_2.png) [@dstuart](https://forums.suse.com/u/dstuart)\
**Post date:** [September 23, 2020, 1:52pm UTC](https://forums.suse.com/t/solved-setting-max-pods/11866/11 "2020-09-23T13:52:58Z")

</div>

> [@naisanza](#):
>
> ```auto
> kubelet: 
> extra_args:
> max-pods: 500
> 
> ```

So I am having the same issue with a cluster creating via the rancher interface. If I create new cluster and deploy the docker container as per instructions it goes off and sets up everything correctly, but as above I can’t alert it in the YAML. Does this mean I would better off creating the new bare metal cluster via rke which allows me to update max pods? Is there anyway of adding extra options on cluster creations??  
Update: I am using Rancher 2.4.6

---

<div class="post-metadata">

**Author:** ![dstuart](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/dstuart/32/5598_2.png) [@dstuart](https://forums.suse.com/u/dstuart)\
**Post date:** [September 24, 2020, 4:09pm UTC](https://forums.suse.com/t/solved-setting-max-pods/11866/12 "2020-09-24T16:09:57Z")

</div>

Ok, so I ended up using RKE on the bare metal cluster and adding the settings as per above. Then I used the import cluster option instead of the create new cluster. Not a solution but it works

---

<div class="post-metadata">

**Author:** ![Collin\_Herber](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/collin_herber/32/5997_2.png) [@Collin\_Herber](https://forums.suse.com/u/Collin_Herber)\
**Post date:** [October 2, 2020, 7:16pm UTC](https://forums.suse.com/t/solved-setting-max-pods/11866/13 "2020-10-02T19:16:41Z")

</div>

Also would like to know how to increase the maxpods in those rancher interface created clusters. I’m using AWS EKS and do not see a way to increase the max-pods. This a huge bottleneck for us atm.

---

<div class="post-metadata">

**Author:** ![voarsh2](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/voarsh2/32/7479_2.png) [@voarsh2](https://forums.suse.com/u/voarsh2)\
**Post date:** [February 8, 2023, 7:59pm UTC](https://forums.suse.com/t/solved-setting-max-pods/11866/14 "2023-02-08T19:59:30Z")

</div>

> [@markusressel](#):
>
> `max-pods: '250'`

Will this work on RKE2 clusters? O.o

---

<div class="post-metadata">

**Author:** ![voarsh2](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/voarsh2/32/7479_2.png) [@voarsh2](https://forums.suse.com/u/voarsh2)\
**Post date:** [March 21, 2023, 11:43am UTC](https://forums.suse.com/t/solved-setting-max-pods/11866/15 "2023-03-21T11:43:48Z")

</div>

The answer is NO.  
At least, from RKE 2 Cluster config, setting Kubelet args, agent args, etc for max-pods does nothing and it doesn’t reconcile… big problem. I just ordered more RAM for my systems and can’t fit all the pods because I can’t increase from a measly 110 pods per node…

---

<div class="post-metadata">

**Author:** ![daemonadmin](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/daemonadmin/32/9861_2.png) [@daemonadmin](https://forums.suse.com/u/daemonadmin)\
**Post date:** [May 18, 2023, 9:17am UTC](https://forums.suse.com/t/solved-setting-max-pods/11866/16 "2023-05-18T09:17:34Z")

</div>

Rancher 2.6.12, downstream cluster v1.23.16+rke2r1. This works for me:  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/533ed4518191237684b40c0c7aaac9a3714465cb.png)
