5.3. 对 Red Hat OpenShift Service on AWS 集群中的机器池设置更高的进程 ID 限制


您可以通过创建或编辑更改 the-pod- pids-limit 参数的 KubeletConfig 对象,为现有 Red Hat OpenShift Service on AWS 集群中的机器池设置更高的 pod PidsLimit

重要

在现有机器池中更改 podPidsLimit 会触发机器池中的节点一次重新引导。对于机器池中的工作负载,在峰值使用小时外进行这个变化,并避免升级或休眠集群,直到所有节点重启为止。

先决条件

  • 在 AWS 集群上有一个 Red Hat OpenShift Service。
  • 已安装 ROSA 命令行界面(CLI) (rosa)。
  • 已使用 ROSA CLI 登录您的红帽帐户。

流程

  1. 为集群创建新 KubeletConfig 对象,用于指定 new -pod-pids-limit

    $ rosa create kubeletconfig -c <cluster_name> --name=<kubeletconfig_name> --pod-pids-limit=<value>

    例如,以下命令为 my-cluster 集群创建一个 set-high-pids KubeletConfig 对象,用于为每个 pod 设置最多 16,384 PID:

    $ rosa create kubeletconfig -c my-cluster --name=set-high-pids --pod-pids-limit=16384
  2. 将新的 KubeletConfig 对象与新的或现有机器池关联。

    • 对于新机器池:

      $ rosa create machinepool -c <cluster_name> --name <machinepool_name> --kubelet-configs=<kubeletconfig_name>
    • 对于现有机器池:

      $ rosa edit machinepool -c <cluster_name> --kubelet-configs=<kubeletconfig_name> <machinepool_name>

      输出示例

      Editing the kubelet config will cause the Nodes for your Machine Pool to be recreated. This may cause outages to your applications. Do you wish to continue? (y/N)

    例如,以下命令将 set-high-pids KubeletConfig 对象与 my-cluster 集群中的 high-pid-pool 机器池关联:

    $ rosa edit machinepool -c my-cluster --kubelet-configs=set-high-pids high-pid-pool

    当新的 KubeletConfig 对象添加到现有机器池时,会触发 worker 节点的滚动重启。您可以在机器池描述中检查推出部署的进度:

    $ rosa describe machinepool --cluster <cluster_name> --machinepool <machinepool_name>

验证

  • 确认新设置已放置到机器池的节点:

    $ rosa describe kubeletconfig --cluster=<cluster_name> --name <kubeletconfig_name>

    新的 PID 限制会出现在输出中,如下例所示:

    输出示例

    Pod Pids Limit:                       16384

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部