k3s: option 'kubelet-args' doesn't work when restart node
Environmental Info: K3s Version:
k3s version v1.22.7+k3s1 (8432d7f2) go version go1.16.10
Node(s) CPU architecture, OS, and Version:
Linux data-api-test 4.4.0-177-generic #207-Ubuntu SMP Mon Mar 16 01:16:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Cluster Configuration:
1 server 0 agent
Describe the bug:
kubelet-args doesn’t work when restart server node by script , only work when uninstall server node then reinstall it
Steps To Reproduce:
- install server node
curl -sfL https://get.k3s.io/ | sh - - use
kubectl describe nodecan seeCapacityis equal toAllocatable - make a
/home/wzp/config.yamllike blow
kubelet-arg=kube-reserved: "cpu=500m,memory=1Gi,ephemeral-storage=2Gi"
kubelet-arg=system-reserved: "cpu=500m, memory=1Gi,ephemeral-storage=2Gi"
kubelet-arg=eviction-hard: "memory.available<500Mi,nodefs.available<10%"
- restart server node
curl -sfL https://get.k3s.io/ | K3S_CONFIG_FILE=/home/wzp/config.yaml sh - - use
kubectl describe nodecan seeCapacityis still equal toAllocatable
but if you uninstall server node and reinstall with config.yaml, these reservation options would work
Expected behavior:
restart node by curl -sfL https://get.k3s.io/ | K3S_CONFIG_FILE=/home/wzp/config.yaml -, the reservation options can work
Actual behavior:
restart node by curl -sfL https://get.k3s.io/ | K3S_CONFIG_FILE=/home/wzp/config.yaml -, the reservation options don’t work
Additional context / logs:
Backporting
- Needs backporting to older releases
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (8 by maintainers)
Configuring Kubernetes components via CLI flags has been deprecated upstream for years. We still use it extensively. If upstream ever does get around to moving forward on actually removing support for it, we will provide some way to migrate our pass-through arguments (–kubelet-arg, etc) over to config files.