-
Notifications
You must be signed in to change notification settings - Fork 716
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
do not annotate the Node CRI socket in the "init upload-config" phase #1924
Comments
/priority important-longterm Added the bug kind, but at this stage this is mostly a question to understand whether this is a bug or just something we can improve. |
/assign @neolit123 @fabriziopandini @rosti @yastij |
Submitted kubernetes/kubernetes#85419 for feedback. /lifecycle active |
I'm a little bit torn about this. Getting into the detail of this use case, what are the expectation when running |
/remove-kind bug |
runUploadKubeletConfig
annotates the CRI socket
AIUI it's backlog work in SIG-Node. If someone's interested in helping move componentconfig forward, I'm happy to help. IMO it should be at least a little easier now that dynamic Kubelet config is being removed. @SergeyKanzhelev @dchen1107 |
the there is already a PR for the CRI endpoints to be added in config: if something like that lands, in theory we don't need the CRI socket annotation on the Node object that kubeadm does any more. however, if we plan to remove it, it opens up for a redesign requirement on the kubeadm side.
such a change would deserve a kubeadm KEP or a design doc at minimum. |
It would be a good approach.
I would like the KEP after the kubelet flag-to-configuration migration. |
kubernetes/kubernetes#112136 was opened for the kubelet configuration migration |
/assign As this may need a KEP, I will start it once I have time after the code freeze. The target release may be 1.28. |
consolidating into |
Is this a BUG REPORT or FEATURE REQUEST?
BUG REPORT
Context
During Kubernetes upgrades using
kubeadm
we have the desire to patch the Kubelet configuration. While we could write some flags on asystemd
unit to override some flags, the Kubelet flags are deprecated (at least the ones relevant to us at this point) and they will be gone in favour of configuration-only anytime soon.The preferred way is to use the Kubelet configuration file instead. When upgrading a minor Kubernetes version, the following workflow could be performed:
kubeadm
to the latest desired version (x.y
)kubeadm init phase upload-config kubelet
, so the defaultkubelet-config-x.y
ConfigMap is createdkubelet-config.x.y
ConfigMap to include the desired changeskubeadm upgrade apply
andkubeadm upgrade node
on the different nodes comprising the clusterWhat happened?
When running
kubeadm init phase upload-config kubelet
, the CRI socket annotation logic runs as well as part of this phase, and that needs the node registration (thus, it needs a configuration file).If you run this command without a configuration file you'll see an error like so:
What you expected to happen?
I would expect the CRI annotation to not happen during this phase, so it's possible for the
upload-config kubelet
phase to just upload the config and don't attempt to annotate the CRI socket in any way.How to reproduce it (as minimally and precisely as possible)?
Run
kubeadm init phase upload-config kubelet
without a--config
parameter.Anything else we need to know?
The logic is triggered here:
https://github.com/kubernetes/kubernetes/blob/beaf3a2f04f2882b9e1de99e4b4f2f06995e3d82/cmd/kubeadm/app/cmd/phases/init/uploadconfig.go#L127-L130
The text was updated successfully, but these errors were encountered: