-
Notifications
You must be signed in to change notification settings - Fork 717
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
adjust the kubeadm / kubelet skew policy #2924
Comments
@NorthFuture thanks for logging the issue.
one quick workaround is to add the flag. but another workaround is to just skip the kubelet-config phase with --skip-phases
as noted on slack: it's actually two polices: you can read more about the current state of the kubeadm skew here: so technically if the user deploys kubeadm version == control-plane version and we extend the kubelet skew to n-2 we will align with the new policy. |
should we add this flag and would it help?
this however means we need to support it. if the kubelet starts making some drastic changes we will need to spend time maintaining this n-2 skew one good aspect is that the kubelet has not been chaning much and we already have e2e tests for this unsupported by kubeadm skew: see the kubeadm-kinder-kubelet-x-on-y tests all the way to n-3 (e.g. k8s at 1.28, kubelet at 1.25), which tests were requested by SIG node at some point. WDYT? |
this seems to be valid for annual node upgrade. I need to check the kep by Jordon tomorrow to confirm about the details(that is valid kubelet skew) |
Just a consideration on the usage of this flag: while it's true that the upgrade can be forced, usually I'm not inclined to force some action when there's a blocking error (if someone put in place a blocking error, there might a reason 😄 ) if kubeadm skew policy is extended, no -f flag is required correct? |
agreed that not blocking with a skew error is the preferred action. the flag is just missing for "upgrade node", which is more of a side issue. |
I found that But ideally, I think we'd better make |
There is an upgrade proposal to make annual node upgrade possible:
|
In the short-term, having
Making sure node folks are aware of tools (like
+100 on already having visibility to how well this works for some kubeadm commands (and it's been working well). Having visibility to whether it actually works to use kubeadm to upgrade a control-plane while nodes are at n-1 or n-2 (using
This would be my ideal as well. For the folks that know
|
+1
our tests can hopefully catch such changes.
yes, we are going to have to add an explicit e2e test for the n-2 kubelet upgrade.
i was thinking that likely flags/config changes can break us. for example the --bootstrap-kubeconfig and --kubeconfig flag of the kubelet has been deprecated (?) and planned for removal, that was discussed in an issue somewhere. the kubelet v1beta1 does not have the fields for these options yet. as an example, and if this is still in the plans, the kubelet maintainers must carefully execute the removal of the flag and addition of the options in config. this will have a wider effect than kubeadm.
in the past we have done different kubelet flags/fields for different kubelet versions, which is just branching in the kubeadm code that manages the kubelet and it is kept for 1,2 releases with a TODO for a later cleanup. there is no persistent node specific component configuration support per se on the API server side, but there is:
AFAIK, no. IIRC, the rule in the kubelet is to always add a field in the config, the corresponding CLI flag may or may not be added (?). not having the micro-versions or history in the kubeletconfiguration makes it a bit difficult for the admin to determine what version of the API has the new option kubeadm will throw a warning for the unknown field depending on the kubelet public type it imported. |
Can we keep the kubelet configuration as is if the kubelet version is n-1 or n-2 which is not the same as the kubeadm version? Then kubelet will have no risk of being corrupted. When we upgrade the kubelet and run the We only keep the control-plane version compatible kubelet configurations in the configmap |
we are going to continue managing a single kubeletconfiguration config map for now. but eventually if kubeletconfiguration v1 is released and v1beta1 deprecated and removed, we need to plan how to upgrade users and whether we need to store both v1 and v1beta1 in a config map, temporarily. |
Given how long v1beta1 kubelet config has been around, supporting it in parallel with any eventual v1 config file for several releases (maybe 4 so n-3 would work) would seem reasonable to me. If kubeadm folks have an idea of how parallel v1beta1 and v1 config blobs could be provided as well, that's another possibility. Sounds like there's no known issues that make this impossible, more uncertainty about kubelet config evolution and compatibility across multiple versions. I think sig-node would be amenable to making any config transitions as easy as possible for cluster admins (like kubeadm and others). |
Summary of what may need an update later(if we make the skew policy of kubelet can be n-3 of kube-apiserver):
// newK8sVersion.Minor() > kubeletVersion.Minor()+MaximumAllowedMinorVersionKubeletSkew
workaround:
workaround: |
@neolit123 should we make it in v1.29? Are there any other action items before this? |
we can try for 1.29. actions:
|
I can see that the skew policy has been updated. @pacoxu Are you also adding the e2e test ? |
updated the OP here, with some notes on what we decided to do with our existing kubelet skew jobs in terms of this preflight error: |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
we realized this is not needed, as ignoring the preflight error (optionally) is enough.
done
done
we understood we cannot remove the -f for upgrade apply due to how -f is designed and used to also for pre-release versions. i consider the tasks here done on a best effort. |
edit by neolit123
action items:
kubeadm: adjust kubeadm skew policy for upgrades kubernetes#120825
v1.29: kubeadm skew policy for kubelet is n-3 website#43769
- [ ] add the -f flag forupgrade node
. this is a nice to have, we missed 1.29, so it can be added in 1.30.TODO
- [ ] add one new e2e test, that upgrades with the new kubelet skew without -f.(this is actually difficult because -f is required in our CI; it's used for kubeadm to allow upgrading to a pre-release / CI artifact)
TODO
- [ ] in 1.32 remove--ignore-preflight-errors=KubeletVersion
from the kinder kubelet skew jobs see this note for detailsTODO
UPDATE
not needed
#2944 (review)
how was 1.32 established (UPDATE note needed)
FEATURE REQUEST:
with kubernetes 1.28 the skew policy for control plane components has been updated, and now you can have control plane components that's three versions ahead than kubelets.
However kubeadm has still a n-1 skew policy. Such policy prevents to skip some kubelet upgrates of worker nodes, that could save a lot of time during upgrades in large clusters.
edit(neolit123): KEP LINK:
Support Oldest Node And Newest Control Plane
https://github.com/kubernetes/enhancements/tree/master/keps/sig-architecture/3935-oldest-node-newest-control-plane
Versions
kubeadm version (use
kubeadm version
): 1.28Environment:
kubectl version
): 1.28uname -a
): N/AWhat happened?
during kubeadm upgrade apply the upgrade processes si stopped with the following error
What you expected to happen?
To be able to upgrade the control plane to 1.28 even if the cluster has 1.26 or 1.25 kubletes.
The text was updated successfully, but these errors were encountered: