查看

默认是110

#命令
kubectl describe node <node-name>
kd

修改最大Pods数

每个节点需要单独设置

vi /etc/systemd/system/k3s.service
ExecStart=/usr/local/bin/k3s \
    server \
    '--kubelet-arg=max-pods=200' \

systemctl daemon-reload
systemctl restart k3s

最大不大于256

agent

# cat /etc/systemd/system/k3s-agent.service
ExecStart=/usr/local/bin/k3s \
    agent \
    '--kubelet-arg=max-pods=200' \

systemctl daemon-reload
systemctl restart k3s-agent

安装时

# curl -sfL https://get.k3s.io | sh -s - --kubelet-arg=max-pods=200 
# curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--kubelet-arg=max-pods=200"