SUSE Support

Here When You Need Us

How to change the maxpod limit in RKE2 cluster

This document (000021093) is provided subject to the disclaimer at the end of this document.

Environment

Rancher 2.x
RKE2 cluster

Situation

The existing RKE2 cluster's pod limit has been exhausted and needs to be increased.

Resolution

Use the below arguments in the Rke2 configuration file /etc/rancher/rke2/config.yaml
kubelet-arg:
  - "max-pods=200"

Once the configurations are updated, you will need to restart the rke2-agent.service for the changes to apply.

If it's a downstream cluster managed through Rancher then, in the cluster configuration form, update the value under "Advanced" in kubelet args.

For rke2 clusters not managed by Rancher, this config is applied per-node
 

Status

Top Issue

Additional Information

When looking to change the max-pods for a node, make sure to take into account the number of IP addresses available from each nodes node-cidr, as this will limit the number of pods that can be scheduled on a node.

Example of JSON data for kubelet-arg max-pods.
{
  "node-label": [
    "cattle.io/os=linux",
    "rke.cattle.io/machine=46e7c4ec-9f13-4e54-a656-fab20689792a"
  ],
  "private-registry": "/etc/rancher/rke2/registries.yaml",
  "protect-kernel-defaults": false,
  "server": "https://xx.xxx.xx.xxx:9345",
  "token": "xxxxxxxxxxxxxx",
  "kubelet-arg": [
    "max-pods=120"
  ]
}

 

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000021093
  • Creation Date: 24-Jan-2024
  • Modified Date:27-Mar-2024
    • SUSE Rancher

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.