New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting control-plane-resource-requests in config.yaml has no effect #4323
Comments
Please check the static pod manifest on the node; the kubelet has a bug that can cause the mirror pods (visible from |
If you mean files in It's however quite strange and it affects pod scheduling. I'm now at 112% allocation of CPU requests and can't start anything that specifies CPU requests, even 100m blocks the pod from starting. If the reported values would be correct there wouldn't be such issue. I'm basically trying to decrease most of these CPU requests values in order to get it running at one small and resource constrianed host which would be used for some lightweight workload. By the way it looks like the cloud-controller-manager CPU requests value can't be set below 100m - even if it's set to a lower value, it still shows 100m in the pod manifest file. |
You'd be better off running K3s. |
I tested that and the overall difference in the resource consumption isn't actually that big. Still, the resource settings should work properly I believe. |
Hi, I have the same issue here where I can see that the values from my config.yaml has come through to the RKE2 server (as seen in the "default" values for the --control-plane-resource-requests flag screenshot) but the pods don't change their requested resources (second screenshot). Is there any consideration given to this bug, or is this unlikely to be fixed? |
There is a bug in the upstream Kubernetes code that causes the kubelet not to update the mirror pods on the apiserver, which is what you see when you use kubectl to view the static pods. The actual static pod definitions, include resources used by the pods, have been updated as per #4323 (comment) |
You might try running the rke2-killall.sh script to force the pods to be recreated? I believe that should resync the mirror pods. Or just reboot the node. |
Unfortunately none of that helped in our case, it's still incorrect. |
Hmm. Doing this should delete the mirror pods from the apiserver, and allow the kubelet to re-sync them, give it a try? kubectl delete pod -n kube-system -l tier=control-plane If that works it's a good work-around, but I don't like the fact that the mirror pods get out of sync. We statically generate the pod UIDs for reasons, but that does trigger the upstream issue with the mirror pods getting unsynchronized with the actual static pod config. |
Please let me know if that workaround works. I've put this in next-up as a reminder to myself to see if there's a better way to allow the pods to reconcile while the apiserver is down, but doesn't get the mirror pods out of sync. |
I rebooted the node and ran into some issues with things not coming back up properly - ran the rke2-killall.sh script "to be safe", and then spent the rest of the day trying to fix everything, haha. Today I just backed up all my data, deleted my VM and started from scratch because the cloud-controller-manager and kube-controller-manager were stuck on container creations in an endless loop (due to race conditions, apparently) and I didn't know how to resolve it otherwise. I created my config.yaml before installing RKE2 though and have successfully changed the CPU requests for control plane components. |
Closing this out in favor of tracking this in #3725 |
Actually, lets track them both, since the steps to reproduce are different (upgrades vs changing resources). |
Validated on release-1.27 branch with version v1.27.5-rc2+rke2r1
Cluster Configuration:
Config.yaml:
For the initial install - keeping the control plane values to default values. Testing Steps: Copy config.yaml example provided above ^^
Install RKE2
Validation Results:
Edit config.yaml and restart rke2 server/agent services. And verify the values for different pods:
Verify if value changes are reflected in the corresponding pods:
|
Environmental Info:
rke2 version v1.25.9+rke2r1 (842d05e)
go version go1.19.8 X:boringcrypto
Node(s) CPU architecture, OS, and Version:
Rocky Linux release 9.1 (Blue Onyx)
Linux kernel 5.14.0-162.23.1.el9_1.x86_64 # 1 SMP PREEMPT_DYNAMIC Tue Apr 11 19:09:37 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
2 CPUs
Cluster Configuration:
1 server
Describe the bug:
I'm trying to set
control-plane-resource-requests
in/etc/rancher/rke2/config.yaml
as described at https://docs.rke2.io/advanced#control-plane-component-resource-requestslimitsBasic example I tried:
However even after restarting the whole host the output from
kubectl describe nodes
still shows that the default value (250m in this case) is used.I suppose that these settings may have effect only when the node is being created. Is that correct? How to change these settings later then? Do I have to find and modify the data directly in the etcd database?
The text was updated successfully, but these errors were encountered: