kubelet 配置文件设置pod数量

Posted mb60ffb84ea5705

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了kubelet 配置文件设置pod数量相关的知识,希望对你有一定的参考价值。

查看kubelet进程

kubelet

 

 

修改配置文件,添加  --max-pods=10

[root@node1 ~]# vim /lib/systemd/system/kubelet.service.d/10-kubeadm.conf

# Note: This dropin only works with kubeadm and kubelet v1.11+
[Service]
Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf"
Environment="KUBELET_CONFIG_ARGS=--config=/var/lib/kubelet/config.yaml"
# This is a file that "kubeadm init" and "kubeadm join" generates at runtime, populating the KUBELET_KUBEADM_ARGS variable dynamically
EnvironmentFile=-/var/lib/kubelet/kubeadm-flags.env
# This is a file that the user can use for overrides of the kubelet args as a last resort. Preferably, the user should use
# the .NodeRegistration.KubeletExtraArgs object in the configuration files instead. KUBELET_EXTRA_ARGS should be sourced from this file.
EnvironmentFile=-/etc/sysconfig/kubelet
ExecStart=
ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS --max-pods=10

 

重启

systemctl daemon-reload
systemctl restart kubelet

 



以上是关于kubelet 配置文件设置pod数量的主要内容,如果未能解决你的问题,请参考以下文章

kubelet 的工作流程

kubelet Pod 的状态分析

kubelet 原理解析二:pleg

OpenShift节点kubelet证书过期异常的解决步骤

kubelet启动之启动oomWatcher模块

kubelet组件功能