在oc的node配置文件中添加
...... kubeletArguments: cgroups-per-qos: - "true" cgroup-driver: - "systemd" enforce-node-allocatable: - "pods" pods-per-core: #每核cpu数可运行的pod数 - "10" max-pods: #node节点最大可运行的pod数,比 pods-per-core严格 - "60" kube-reserved: #kube组件保留资源 - "cpu=200m,memory=256M" system-reserved: #其他系统组件保留资源比如:docker - "cpu=200m,memory=256M" image-gc-high-threshold: - "90" image-gc-low-threshold: - "80" eviction-hard: #硬驱逐策略 - "memory.available<256Mi,nodefs.available<2Gi,nodefs.inodesFree<5%,imagefs.available<1Gi,imagefs.inodesFree<5%" eviction-soft: #软驱逐策略 - "memory.available<512Mi,nodefs.available<4Gi,nodefs.inodesFree<10%,imagefs.available<2Gi,imagefs.inodesFree<10%" eviction-soft-grace-period: #软驱逐策略宽限期 - "memory.available=30s,nodefs.available=30s,nodefs.inodesFree=30s,imagefs.available=30s,imagefs.inodesFree=30s" ......