Skip to content
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

Define upgrade path for ComponentConfig #1681

Open
fabriziopandini opened this issue Jul 22, 2019 · 10 comments
Open

Define upgrade path for ComponentConfig #1681

fabriziopandini opened this issue Jul 22, 2019 · 10 comments
Labels
area/upgrades kind/bug Categorizes issue or PR as related to a bug. kind/documentation Categorizes issue or PR as related to documentation. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Milestone

Comments

@fabriziopandini
Copy link
Member

fabriziopandini commented Jul 22, 2019

kubeadm allow usage of component config for defining settings for kubelet and kube-proxy; component configs are stored in ConfigMaps and reused when joining nodes or doing upgrades.

However, as of today kubeadm does not yet define a procedure for upgrading component configs in the case such API change format e.g. change from kube-proxy/config/v1alpha1 to kube-proxy/config/v1alpha2.

As an initial step, we should evaluate if this is the scope of kubeadm because it requires a certain degree of coordination across nodes (there should not be old components referring to a new/not supported component config), and this can't be achieved by kubeadm alone.
If this is the case, it should be documented what is the expected procedure higher-level tools/user's should take care of.

It is also important to keep in mind nuances of component config management for kubelet (1CM per version, copied locally) and kube-proxy (1CM, linked by all instances).

k/e issue + KEP:
kubernetes/enhancements#1381

/cc @rosti

@fabriziopandini fabriziopandini added kind/bug Categorizes issue or PR as related to a bug. area/upgrades priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. kind/documentation Categorizes issue or PR as related to documentation. labels Jul 22, 2019
@fabriziopandini fabriziopandini added this to the Next milestone Jul 22, 2019
@rosti
Copy link

rosti commented Jul 23, 2019

I was actually raising this exact question in the past few weeks with WG Component Standard, but so far no concrete decisions have been taken.
This same problem is faced, not only by kubeadm, but by other cluster provisioning tools too (like kops for instance). So I suppose that we need a broader WG Component Standard meeting with kubeadm and other cluster provisioning tools on that matter.
@mtaufen @stealthybox @sttts @justinsb WDYT?

@neolit123
Copy link
Member

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 11, 2020
@neolit123
Copy link
Member

/lifecycle frozen

@k8s-ci-robot k8s-ci-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 11, 2020
@xlgao-zju
Copy link

like what we discussed in #1582
seems up-convert these component configs is out of kubeadm's scope...?

@neolit123
Copy link
Member

yes, unless the component start exposing a conversion path for their managed ComponentConfig API / types.

@wangyysde
Copy link
Member

/cc @wangyysde

@neolit123
Copy link
Member

neolit123 commented Jun 5, 2024

the kube-proxy v1alpha2 is planned for release in 1.31.
kubernetes/kubernetes#121830
cc @SataQiu @pacoxu @carlory

kube-proxy has enabled the following as a migration plan, which is good:

https://github.com/kubernetes/enhancements/blob/master/keps/sig-network/784-kube-proxy-component-config/README.md#upgrade--downgrade-strategy

/usr/local/bin/kube-proxy --config old-v1alpha1.yaml --write-config-to new-v1alpha2.yaml

since kubeadm runs kube-proxy as a container / DS we might have to jump a couple of additional hoops, but up-converting the already-in-cluster kube-proxy config to v1alpha2 seems doable.

  • during upgrade apply if there is a kube-system/kube-proxy config CM:
    • upgrade kube-proxy to 1.31 or a version that has v1alpha2.
    • download the config and save it somewhere locally
    • start a Job with the kube-proxy container, mounting the config location
    • call kube-proxy --config old-v1alpha1.yaml --write-config-to ... from the container
    • write the resulting config to the kube-system/kube-proxy config CM

i will experiment with this and provide a PR or if there are complications this can be a google doc first.
please add any comments if needed.

@neolit123
Copy link
Member

looks like both kube-proxy and kube-scheduler support the --write-config-to flag. the kubelet does not yet
logged this ticket for it:
kubernetes/kubernetes#125344

@neolit123
Copy link
Member

neolit123 commented Jun 5, 2024

in terms of the ticket here, IMO the upgrade path is:

  • on upgrade kubeadm calls the component binary to migrate the user config on disk and in cluster config maps. this should be done after kube-proxy is upgraded to 1.31 or a version that has v1alpha2.
  • on init similar is done if the user passes an old config version. tricky for kube-proxy on init but doable.
    • kubeadm continues to accept the old CC config on init for N releases (to be discussed).
    • after N releases kubeadm stops doing the migration on init, but can throw an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/upgrades kind/bug Categorizes issue or PR as related to a bug. kind/documentation Categorizes issue or PR as related to documentation. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

No branches or pull requests

7 participants